Slash command/skill with `context: fork` returns result as `<local-command-stdout>` instead of a visible assistant message (output never renders)

Open 💬 2 comments Opened Jun 25, 2026 by MalteKrueger

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

  1. Create both files; start a fresh session.
  2. Run /forktest-mainREPRO-OUTPUT: return works renders in chat. ✅
  3. Run /forktest-forknothing 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 → an assistant message with text REPRO-OUTPUT: return works (renders).
  • /forktest-fork → a user-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 own subagents/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-purpose subagent (no plugins).

---
🤖 Reported with Claude Code — Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗