Conversation
The stop-review child timeout matched the Stop hook's 900s budget, so Claude Code killed the hook before it could emit the ETIMEDOUT reason. Lower the inner spawnSync timeout to 14 minutes so a slow review still returns the bypass/manual-review message instead of ending the turn silently. Fixes openai#766.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Stop hook is declared with a 900s timeout in
hooks.json, and the review child it spawns used the same 900sspawnSynctimeout. The hook starts first, so Claude Code kills it while the child is still inside its own window. The only stdout write happens afterspawnSyncreturns, so a genuinely slow review ends the turn with no message instead of the intended "run/codex:review --waitor bypass the gate" reason.Change
Lower
STOP_REVIEW_TIMEOUT_MSto 14 minutes so the hook has 60s of headroom to emit the existingETIMEDOUTpath. Update the timeout message to match.Test
stop-review task timeout leaves headroom under the Stop hook timeoutfails on main (inner === hook) and passes after this change.Fixes #766.
AI-assisted (Grok)