Skip to content

feat(skill): add read_skill for inline skill loading in plan mode (#3491)#3713

Merged
esengine merged 1 commit into
main-v2from
fix/3491-read-skill
Jun 9, 2026
Merged

feat(skill): add read_skill for inline skill loading in plan mode (#3491)#3713
esengine merged 1 commit into
main-v2from
fix/3491-read-skill

Conversation

@esengine

@esengine esengine commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Problem (#3491)

In plan mode the agent can't load a skill: run_skill is ReadOnly()=false (a subagent skill may call writer tools), so the read-only plan-mode gate blocks it — even for inline skills, which only render a body and have zero side effects. Plan mode then can't consult a playbook.

Fix

Add read_skill, a read-only counterpart:

  • ReadOnly() = true → callable in plan mode.
  • Renders an inline skill body (reuses renderInline), same name/arguments schema as run_skill.
  • Rejects subagent skills with a message pointing to run_skill/the dedicated tool, so it can never execute a subagent (which is why run_skill stays gated).
  • Registered in boot next to run_skill, and added to SubagentMetaTools() so spawned agents don't inherit it.

Note: the existing PR #3515 is titled for this but its diff is actually the already-landed /rewind command, so it does not implement read_skill.

Test plan

  • internal/skill: TestReadSkillLoadsInlineAndIsReadOnly (loads inline + ReadOnly), TestReadSkillRejectsSubagent. Pass.
  • go test ./internal/skill ./internal/agent green; go vet + golangci-lint (0 issues) + gofmt clean.

Closes #3491

run_skill is ReadOnly()=false because subagent skills can spawn writer tool
calls, so plan mode (read-only) blocks ALL skill use — including inline skills,
which only render a body and have no side effects. That made it impossible to
consult a playbook while planning (#3491).

Add read_skill: a read-only counterpart that renders an inline skill body and
rejects subagent skills (pointing the model at run_skill). Being ReadOnly it
stays available in plan mode. Added to SubagentMetaTools so spawned agents
don't inherit it.

Closes #3491
@esengine esengine requested a review from SivanCola as a code owner June 9, 2026 13:33
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development skills Skill system (internal/skill, internal/tool) agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) labels Jun 9, 2026
@esengine esengine merged commit dea3ee1 into main-v2 Jun 9, 2026
14 checks passed
@esengine esengine deleted the fix/3491-read-skill branch June 9, 2026 13:36
SuMuxi66 pushed a commit to SuMuxi66/DeepSeek-Reasonix that referenced this pull request Jun 10, 2026
…sengine#3713)

run_skill is ReadOnly()=false because subagent skills can spawn writer tool
calls, so plan mode (read-only) blocks ALL skill use — including inline skills,
which only render a body and have no side effects. That made it impossible to
consult a playbook while planning (esengine#3491).

Add read_skill: a read-only counterpart that renders an inline skill body and
rejects subagent skills (pointing the model at run_skill). Being ReadOnly it
stays available in plan mode. Added to SubagentMetaTools so spawned agents
don't inherit it.

Closes esengine#3491

Co-authored-by: reasonix <reasonix@deepseek.com>
dorokuma pushed a commit to dorokuma/DeepSeek-Reasonix that referenced this pull request Jun 10, 2026
…sengine#3713)

run_skill is ReadOnly()=false because subagent skills can spawn writer tool
calls, so plan mode (read-only) blocks ALL skill use — including inline skills,
which only render a body and have no side effects. That made it impossible to
consult a playbook while planning (esengine#3491).

Add read_skill: a read-only counterpart that renders an inline skill body and
rejects subagent skills (pointing the model at run_skill). Being ReadOnly it
stays available in plan mode. Added to SubagentMetaTools so spawned agents
don't inherit it.

Closes esengine#3491

Co-authored-by: reasonix <reasonix@deepseek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) skills Skill system (internal/skill, internal/tool) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: run_kill is writer tool

1 participant