Repository navigation
Conversation
Hook refuses run_in_background and low-timeout configured verification for every claude -p stage (minimal Bash-only hook off GitHub), fixed 10-minute Bash timeout via dispatch settings env, foreground prompt note, background_command_pending diagnostic with confirmed/suspected evidence. Closes #276
[CCR-20261021-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Initial review — PR #297 (work item 276)Status: REVIEW_PASSED_AWAITING_CI — head SummaryThe change keeps dispatched Claude Findings[REV-001] · low · open · - · blocks:no — Foreground prompt text names Claude for every executor
[REV-002] · low · open · - · blocks:no — Unrelated whitespace regression in
|
| Command | Result |
|---|---|
python3 -m unittest discover -s tests |
pass: Ran 1652 tests in 319.252s — OK (exit 0) |
python3 scripts/validate-package.py |
pass: VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
python3 -m unittest (third configured command) was not run separately: it discovers 0 tests per the PR description and duplicates the discovery run above.
Unverified
- The live reproduction from the issue (a real
claude -pstage running a >2-minute suite) was not rerun; the hook, settings, and diagnostics are covered by unit tests and code inspection only. - Whether Claude Code honours
BASH_DEFAULT_TIMEOUT_MS/BASH_MAX_TIMEOUT_MSfrom the--settingsenvblock was not observed at runtime.
CI (policy: parallel, read once, not waited)
| Check | State |
|---|---|
| Skills, manifests, and Bash installer | pass |
| Windows test shard (windows-1) | pass |
| Windows test shard (windows-2) | pass |
| Windows test shard (windows-3) | pass |
| Windows test shard (windows-4) | pass |
| PowerShell installer | pending |
Residual risks
A configured suite that genuinely exceeds 10 minutes is killed by Claude's Bash timeout and reported as BLOCKED; this is documented behaviour. The suspected pending-command heuristic is a text match on the final message and only affects diagnostic wording.
Verdict
Review complete for head bfbb308d7b411790df9d321826bf6ee7d6c32766; no blocking findings. REVIEW_PASSED_AWAITING_CI — the CI gate must wait for the pending checks.
Summary
Keep dispatched Claude
-pstages from ending while Bash commands are still running. A PreToolUse hook rejects background Bash calls and configured verification calls with a timeout below 10 minutes. Claude receives the 10-minute Bash default and maximum through its dispatch settings, and every dispatched stage prompt tells it to wait for verification. When a stage still exits with evidence of a pending command, the runtime names that detail underunreadable_result.Closes #276
Diagnosis
The reported symptom is a Claude
-pstage returning without a structured result while its verification command continues in the background. The issue reports two reproductions during PR #273 rereview. The reproduced mechanism matches the hypothesis: Claude's Bash default foreground timeout is shorter than the configured full test suite, and ending the-pturn prevents later output from being collected. The invariant is that a dispatched stage must not finish while one of its commands is pending. This is an isolated defect in Claude stage dispatch. Related search was widened because the issue is a bug describing a runtime symptom; related items are #130 (closed, host background-task limits) and #274 (closed, slow sandbox verification). Neither changes the root cause addressed here.The branch tests cover the configured 10-minute timeout settings, refusal of background and low-timeout verification calls, a structured result after a configured verification call, and confirmed/suspected pending-command diagnostics. The live reproduction described in the issue was not rerun in this implementation attempt.
Work units
WU-1scripts/executors.py,scripts/run_cycle.py,scripts/stage_permissions.py,skills/cc-verify/SKILL.mdtests/test_dispatch_failures.py,tests/test_stage_dispatch.py,tests/test_stage_permissions.pypython3 -m unittest discover -s tests(1,652 tests, pass);python3 scripts/validate-package.py(pass);python3 -m unittest(0 tests discovered, exit 0)independent— revert this commit to restore the previous dispatch behaviorVerification environment
The local discovery suite and package validator passed in this checkout. Local runs use the checkout's Python environment; CI runs on the pushed head provide the clean-runner result. No dependency or CI configuration changed.
Checks
Head
bfbb308d7b411790df9d321826bf6ee7d6c32766: