Skip to content

discovery: explore-deep gates skill-level context: fork behind CLAUDE_CODE_FORK_SUBAGENT — wrong mechanism, unreachable fallback #1267

Description

@kyle-sexton

Observation

plugins/discovery conditions its forked-skill execution on
CLAUDE_CODE_FORK_SUBAGENT=1 in four places. That environment variable does not
gate skill-level context: fork.

Per the official subagents reference (fetched 2026-07-24,
https://code.claude.com/docs/en/sub-agents) the variable gates the Agent
tool's fork subagent type
and the /subtask command. The skills reference
(https://code.claude.com/docs/en/skills) documents context: fork with no
environment gate at all.

Its actual effect runs the opposite direction from what the plugin claims:

When CLAUDE_CODE_FORK_SUBAGENT is set to 1, every subagent runs in the
background and the frontmatter background field has no effect.

So unset is the normal working state; setting it removes backgrounding control.

The documented fallback is also unreachable. explore-deep/SKILL.md:7
already declares context: fork, so by the time the skill body executes it is
inside the fork and cannot detect fork-unavailability to fall back from.
evals/evals.json case 2 asserts that branch.

Separately, explore-deep/SKILL.md:24 claims "You inherit the parent's full
toolset". That is conversation-fork behavior. Per the skills reference, a
backgrounded fork runs with the narrower background-subagent tool set, and
background: false is what restores the full set. No functional breakage today
— every tool the workflow uses is inside the background set — but it misleads
anyone extending the skill.

The same variable is described correctly elsewhere in the marketplace:
plugins/re-anchor/skills/sweep-all-disciplines/SKILL.md attaches it to the
Agent-tool fork type and explicitly distinguishes the two meanings. That path
moves under the in-flight re-anchordiscipline rename; the citation is
against main as of filing.

Direction (no open decision)

  • Remove the CLAUDE_CODE_FORK_SUBAGENT precondition from
    plugins/discovery/skills/explore-deep/SKILL.md:3,
    plugins/discovery/README.md:12, and
    plugins/discovery/skills/explore/SKILL.md:24. In the last, keep the preceding
    explicit-scope sentence — it is correct and load-bearing.
  • Delete eval case 2 fallback-when-fork-unavailable rather than adjusting it.
    The branch cannot fire.
  • Replace the toolset-inheritance claim with the background-subagent tool set.
  • Version bump plus CHANGELOG entry (changelog-parity is a CI gate).

Acceptance

  • No CLAUDE_CODE_FORK_SUBAGENT reference remains in plugins/discovery
  • evals.json contains 5 cases; no case asserts a fork-unavailable fallback
  • The toolset statement matches the documented background-subagent set
  • Any retained fork claim is traceable to a doc fetched in the authoring
    session, cited inline
  • plugin.json version bumped with a matching CHANGELOG entry

This was generated by AI during a /planning:interview session on the fact-check capability.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions