Skip to content

context: fork skills dispatch to background agent with no task/instructions #82240

Description

@adrianpk-irl

Summary

Skills whose frontmatter sets context: fork are dispatched to a background agent that appears to receive no task content at all — not the invoking user's request, not the skill's own SKILL.md instructions, and no conversation history. It only receives the ambient system-reminder blocks that get attached to any turn (project instructions equivalent, a memory index, and a tool-availability list). With nothing to act on, the forked agent returns a generic "I don't see a request — what would you like help with?" and exits.

Skills without context: fork in their frontmatter are rendered inline in the calling conversation instead (the harness appears to paste the full SKILL.md body into the current turn), and those work correctly — full conversation context, correct execution, no issue.

Reproduction

  1. Have two skills in .claude/skills/, one with context: fork in frontmatter, one without.
  2. Invoke the context: fork skill as a bare local slash command with no arguments (e.g. /daily-plan-custom), in a session with substantial prior conversation history.
  3. Observe the background agent's result: it reports something like "I don't see an actual request in your message — just system context. What would you like me to help with?" — i.e. it never received the skill's own instructions.
  4. Re-run the same invocation. The failure reproduces identically — in my case, two separate runs of the same skill returned near-identical text and identical subagent token counts (57,858 both times), strongly suggesting the forked agent's starting prompt is deterministic and does not include the actual task.
  5. For contrast, invoke a skill in the same session that does not declare context: fork — it runs inline, receives full context, and completes correctly.

Additional data point

A third context: fork skill invoked with explicit arguments passed through (rather than bare) did complete successfully, suggesting the argument text itself reaches the fork, but the skill's own instruction body still may not be — the successful case only worked because the caller happened to supply enough inline detail to reconstruct the task without needing the SKILL.md body.

Environment

  • Claude Code CLI
  • Model: Sonnet 5 (claude-sonnet-5)
  • Observed after switching the session's default model via /model; unconfirmed whether the model switch is causally related or coincidental timing — flagging both possibilities since I can't inspect the dispatch code from inside a session.

Impact

Any skill authored with context: fork (a documented, supported frontmatter key) becomes unreliable — it silently no-ops instead of running, and the failure is not surfaced as an error, so it looks like the skill did something when it didn't. Skills without context: fork are unaffected.

Expected behavior

The forked background agent's initial prompt should include the invoking skill's SKILL.md instructions (and ideally the user's original invocation text/arguments), the same way the non-forked/inline path does.

Metadata

Metadata

Assignees

No one assigned

    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