claude-code - 💡(How to fix) Fix [Bug] PostToolUse "block" reason is additive not substitutive; SubagentStop exit-2 behavior undocumentedroceed [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55527Fetched 2026-05-03 04:51:05
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Root Cause

(1) PostToolUse:Agent with decision: "block" + reason. Docs say
"prevents Claude from seeing the result" + "reason shown to Claude
when blocked" — natural reading is reason substitutes for the body.
Empirically: the original tool_response.output lands in the parent
agent's transcript IN FULL, AND the reason is appended as an
Note: Content was truncated.

RAW_BUFFERClick to expand / collapse

Bug Description Two undocumented behaviors in Claude Code's PostToolUse / SubagentStop
hooks that affect agent-orchestration patterns:

(1) PostToolUse:Agent with decision: "block" + reason. Docs say
"prevents Claude from seeing the result" + "reason shown to Claude
when blocked" — natural reading is reason substitutes for the body.
Empirically: the original tool_response.output lands in the parent
agent's transcript IN FULL, AND the reason is appended as an
Note: Content was truncated.

extent analysis

TL;DR

The issue may be resolved by updating the documentation for PostToolUse and SubagentStop hooks to reflect their actual behavior, particularly regarding the handling of tool_response.output and reason.

Guidance

  • Review the current implementation of PostToolUse and SubagentStop hooks to understand how they handle tool_response.output and reason.
  • Verify that the documentation accurately reflects the empirical behavior observed, including the appending of reason to the parent agent's transcript.
  • Consider updating the documentation to clarify that the original tool_response.output is not prevented from being seen by Claude, but rather is included in the parent agent's transcript.
  • Test the updated documentation with different scenarios to ensure it accurately reflects the behavior of the hooks.

Notes

The provided issue description is truncated, so the full scope of the problem and potential solutions may not be entirely clear. Further investigation into the specific behaviors of PostToolUse and SubagentStop hooks may be necessary to fully address the issue.

Recommendation

Apply workaround: Update the documentation to reflect the empirical behavior of the PostToolUse and SubagentStop hooks, as this will at least clarify the current functionality for users, even if the underlying behavior is not changed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING