Skip to content

Treat a claude wrapper's EX_TEMPFAIL exit as a blocked run - #268

Merged
dmccoystephenson merged 3 commits into
mainfrom
fix/wrapper-tempfail-blocked
Nov 21, 2026
Merged

dmccoystephenson merged 3 commits into
mainfrom
fix/wrapper-tempfail-blocked

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

GARDENER_CLAUDE_BIN may be a wrapper that points Claude Code at another model provider, such as a self-hosted model on a LAN GPU. When that provider is paused or unreachable, the wrapper can exit 75 (EX_TEMPFAIL from sysexits.h) without printing a JSON envelope.

Before this change, such a run was an ordinary per-repo error, so an overnight batch would fail repo after repo within seconds. With this change, a non-JSON exit of 75 is classified as blocked, like the other device-wide failures. The batch then stops with its resume cursor withheld, and the remaining repos are retried on the next run. claude itself never exits 75, so unwrapped runs are unaffected.

  • dispatch.py: EX_TEMPFAIL = 75, checked alongside is_device_global_failure in _run_claude_once's non-JSON path.
  • tests/test_dispatch.py: a wrapper exiting 75 with no JSON is blocked, and the other non-JSON failures are unchanged.
  • docs/HARNESSES.md: the GARDENER_CLAUDE_BIN row describes the exit-75 contract.

Full suite: 1,397 tests pass, 2 skipped.


drafted by Claude on behalf of Daniel Stephenson

🤖 Generated with Claude Code

https://claude.ai/code/session_01LYNeujxeMjcjdhUF7mg3s3

dmccoystephenson and others added 3 commits November 20, 2026 18:32
GARDENER_CLAUDE_BIN may be a wrapper that points Claude Code at another
model provider. When that provider is paused or unreachable, the wrapper
can exit 75 (sysexits EX_TEMPFAIL) without a JSON envelope. That says
nothing about the repo and would fail every remaining repo alike, so the
run is now blocked: an overnight batch stops with its resume cursor
withheld and retries the rest next run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LYNeujxeMjcjdhUF7mg3s3
…cked

The router checked blocked before exit 75, so after this branch a wrapper's
EX_TEMPFAIL exit was labelled blocked, and a provider escalating on tempfail
but not blocked stopped escalating. Exit 75 is now checked first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LYNeujxeMjcjdhUF7mg3s3
@dmccoystephenson
dmccoystephenson merged commit 320fbb0 into main Nov 21, 2026
5 checks passed
@dmccoystephenson
dmccoystephenson deleted the fix/wrapper-tempfail-blocked branch November 21, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant