mirror of
https://github.com/aaddrick/claude-desktop-debian.git
synced 2026-05-17 00:26:21 +03:00
Re-dispatch of #394 confirmed the 300s timeout bounds the step, but also exposed a second bug: the step failed with exit 124 instead of falling through to 8b gracefully. Downstream steps (Decide / Render / Label / Post) were all skipped, and the raw/payload/stderr archives that the earlier hardening created were never written because the shell aborted at the assignment before `printf > investigate-raw.json` could run. Root cause: GHA's default shell is `bash -e {0}` (errexit). With errexit on, a failing command substitution: raw=$(timeout 300s claude -p ...) propagates the exit code and aborts the script BEFORE `claude_exit=$?` runs. My prior assumption that assignments were exempt from errexit under `bash -e` was wrong in this shell configuration. ## Fix Use the if-form, which is the only reliable way to catch a failing command substitution under `bash -e`: if raw=$(timeout 600s claude -p ... 2>log); then claude_exit=0 else claude_exit=$? fi A timeout (exit 124) or other CLI failure now sets `claude_exit`, writes the archived artifacts, and falls through to 8b with a specific warning — exactly the graceful path the earlier PR intended but errexit short-circuited. ## Also bumped timeout 300s → 600s The original 300s was chosen to be "typical investigate runtime + a bit." Observed times: #424 ran 218s, #442 ran 220s — so 300s left almost no headroom. Doubling to 600s gives room for complex issues to converge while still being short of the ~9-minute hang that motivated the timeout in the first place. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>