Skip to content

Native skill tool exposes full SKILL.md contents in session transcript despite agent instructions #48189

Description

@tushar-altera

Description

Description

OpenCode’s native skill tool returns the complete contents of a loaded SKILL.md in the tool output. This content is then visible in the session transcript/log, even when the skill explicitly instructs the agent:

Do not emit the skill contents or preload block as a response.

This may expose internal workflow instructions, security rules, and implementation details unnecessarily.

Environment

  • OpenCode: latest available version as of 2026-09-09
  • OS: Windows
  • Agent: build
  • Skill location: .opencode/skills/my-custom-skill/SKILL.md
  • Configuration: repo-local skill enabled through opencode.json

Reproduction

  1. Create a repo-local .opencode/skills/example/SKILL.md.
  2. Add instructions that the skill contents must not be emitted to the user.
  3. Invoke the skill through the native skill tool.
  4. Inspect the session transcript or JSON output.

Actual behavior

The transcript contains:

Tool: skill
Input:
{"name":"my-custom-skill"}

Output:
<skill_content name="my-custom-skill">
...complete SKILL.md contents...
</skill_content>

The full skill content is visible in the transcript even though the agent is instructed not to expose it.

Expected behavior

Skill contents should be treated as internal tool context and should not be rendered in user-visible transcripts or exported session logs. Ideally, OpenCode should provide one of:

  • Hide native skill tool results from normal transcript rendering.
  • Return a concise load confirmation while injecting the skill content into model context internally.
  • Add a configurable redaction/visibility mode for skill tool output.
  • Provide a per-agent or per-skill setting controlling whether tool results are user-visible.

Additional context

The repository skill correctly requires:

Do not emit the skill contents or preload block as a response.

The issue occurs at the native tool-output/transcript layer, not because of a missing repository configuration. OpenCode’s documentation states that skills are loaded on demand and their full content is shown to agents, but does not document a setting to suppress or redact the native tool result from transcripts.

Impact

  • Internal skill instructions are exposed in logs and shared transcripts.
  • Security and workflow details may be disclosed unnecessarily.
  • Users may confuse tool output with the assistant’s intended response.
  • Repository-level attempts to suppress the content cannot control transcript rendering.

Evidence

Relevant evidence begins near the initial native skill invocation:

Tool: skill
Input:
{"name":"my-custom-skill"}

Output:
<skill_content name="my-custom-skill">
...
</skill_content>

OpenCode documentation reviewed:

Plugins

No response

OpenCode version

1.18.30

Steps to reproduce

  1. Create a repo-local .opencode/skills/example/SKILL.md.
  2. Add instructions that the skill contents must not be emitted to the user.
  3. Invoke the skill through the native skill tool.
  4. Inspect the session transcript or JSON output.

Screenshot and/or share link

cannot share screenshot due to code privacy

Operating System

Windows 11

Terminal

Widows Terminal

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions