Slash command/skill with `context: fork` returns result as `<local-command-stdout>` instead of a visible assistant message (output never renders)
What happens
A custom slash command (or skill) with context: fork runs its forked subagent to completion, but the subagent's result is recorded in the transcript as a <local-command-stdout> block and no assistant message is emitted. In the UI the command appears to "silently stop" — you see the command bubble and then nothing, even though the work completed and the output exists in the transcript.
The docs state the opposite (Fork the current conversation): "When it finishes, its result arrives as a message in your main conversation."
Minimal repro
No plugin, no custom agent — context: fork with no agent: defaults to built-in general-purpose. Two identical user-level commands, differing only by the context: fork line.
~/.claude/commands/forktest-main.md
---
description: control (no fork)
---
Respond with exactly this single line and nothing else:
REPRO-OUTPUT: return works
~/.claude/commands/forktest-fork.md
---
description: fork
context: fork
---
Respond with exactly this single line and nothing else:
REPRO-OUTPUT: return works
Steps
- Create both files; start a fresh session.
- Run
/forktest-main→REPRO-OUTPUT: return worksrenders in chat. ✅ - Run
/forktest-fork→ nothing renders in chat. ❌
Expected
/forktest-fork shows REPRO-OUTPUT: return works (per the docs' "result arrives as a message").
Actual
No assistant message. The line is present only as a <local-command-stdout> block in the transcript.
Transcript evidence (same session, the two runs)
/forktest-main→ anassistantmessage with textREPRO-OUTPUT: return works(renders)./forktest-fork→ auser-role<local-command-stdout> REPRO-OUTPUT: return works </local-command-stdout>(does not render). The forked subagent (agentType: general-purpose) produced the text correctly in its ownsubagents/agent-*.jsonl.
So the work succeeds and is recorded — it is purely a surfacing failure: fork output lands as command stdout instead of the promised assistant message.
Impact
context: fork is unusable for interactive slash commands where the user needs to see the result (e.g. a generated spec, review findings, open questions) — the entire response vanishes from view, with no indication the command did anything.
Environment
- Claude Code
2.1.191 - Windows 11 (win32)
- OS-independent; uses only the built-in
general-purposesubagent (no plugins).
---
🤖 Reported with Claude Code — Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗