[Bug] code-review skill (context: fork) result lost when invoked from subagent
Bug Description
Title: code-review skill (context: fork) returns no result when invoked from inside a subagent
Claude Code 2.1.295, Linux (WSL2)
What happened:
In a multi-agent workflow, the main session spawned a "Reviewer" subagent (Agent tool, isolation: "worktree"). The subagent invoked the built-in code-review skill (level "high") on a git diff. The subagent reported that the skill "started and ran as a background fork" but that it never received the skill's result, so the skill's findings were missing from its final report. The subagent fell back to a manual review.
Afterwards the main session invoked the same skill directly (Skill tool, args: "high <base>...<branch>"). That worked: the skill completed and returned its findings (JSON list) to the main session.
Expected:
Either the subagent receives the forked skill's result (e.g. by waiting, like background: false), or the behavior is documented, or the skill call fails with a clear message instead of silently dropping the result.
What I checked:
The docs (skills.md, sub-agents.md) say context: fork skills run in the background by default and the result is summarized back to the conversation. I found no statement that a fork skill called from within a subagent loses its result. Subagent nesting is documented as allowed (up to 3 levels).
Repro (observed once, not systematically reproduced):
1. Main session spawns a general-purpose subagent with isolation "worktree".
2. Prompt tells the subagent to call the code-review skill on a diff.
3. Subagent finishes its report without the skill's findings and says the fork result never arrived.
Workaround: call the skill from the main session and have the subagent do the review manually.
Environment Info
- Platform: linux
- Terminal: wsl-Ubuntu
- Version: 2.1.294
- Feedback ID: 16bd3df2-2c81-41e3-9694-491236e8e1bd