Classify Claude token-limit failures in the auth smoke test #1500

Closed
opened 2026-07-22 08:50:00 +00:00 by coilyco-ops · 3 comments
Member

Claude prelaunch auth smoke failures currently collapse token-limit/account-limit exhaustion into a generic startup/disk/network message.

Observed while trying to dispatch #1499 with Claude on 2026-07-22:

ward-container: auth smoke test: probing claude before launch (ward#222)
ward-container: bootstrap prelaunch check failed: auth smoke test: claude -p produced no usable output (exit 1) without an auth error - more likely a disk/network/startup problem than credentials (ward#222, ward#273). Disk: / 65.7GiB free of 125.7GiB; /workspace 65.7GiB free of 125.7GiB. WARD_SMOKE_TEST_SKIP=1 bypasses

Kai reports the Claude account is at its token limit, so this diagnostic is misleading. The smoke test may be able to recover a better reason from Claude's stderr, stream-json event payload, exit metadata, local auth/account state, or a specific CLI error string.

Scope:

  • Capture stdout, stderr, and any structured output from the Claude smoke probe in enough detail to classify token-limit/account-limit/quota exhaustion separately from auth, disk, network, and startup failures.
  • If Claude exposes token-limit details, surface them directly in the Ward error.
  • If Claude gives only an opaque exit 1, make the diagnostic say unknown Claude prelaunch failure instead of asserting disk/network/startup is more likely.
  • Add fixtures/tests for auth failure, token-limit/quota failure, and opaque exit 1.
  • Keep secret/token redaction intact in logs and issue comments.

Related context: #1499 also showed the reaper falsely reporting branch/PR/green-check success after a pre-agent failure.

Claude prelaunch auth smoke failures currently collapse token-limit/account-limit exhaustion into a generic startup/disk/network message. Observed while trying to dispatch #1499 with Claude on 2026-07-22: ```text ward-container: auth smoke test: probing claude before launch (ward#222) ward-container: bootstrap prelaunch check failed: auth smoke test: claude -p produced no usable output (exit 1) without an auth error - more likely a disk/network/startup problem than credentials (ward#222, ward#273). Disk: / 65.7GiB free of 125.7GiB; /workspace 65.7GiB free of 125.7GiB. WARD_SMOKE_TEST_SKIP=1 bypasses ``` Kai reports the Claude account is at its token limit, so this diagnostic is misleading. The smoke test may be able to recover a better reason from Claude's stderr, stream-json event payload, exit metadata, local auth/account state, or a specific CLI error string. Scope: - Capture stdout, stderr, and any structured output from the Claude smoke probe in enough detail to classify token-limit/account-limit/quota exhaustion separately from auth, disk, network, and startup failures. - If Claude exposes token-limit details, surface them directly in the Ward error. - If Claude gives only an opaque exit 1, make the diagnostic say `unknown Claude prelaunch failure` instead of asserting disk/network/startup is more likely. - Add fixtures/tests for auth failure, token-limit/quota failure, and opaque exit 1. - Keep secret/token redaction intact in logs and issue comments. Related context: #1499 also showed the reaper falsely reporting branch/PR/green-check success after a pre-agent failure.
Author
Member

WARDED_WORKFLOW: reservation-released

release details

Run never started. ward container reap released container engineer-goose-ward-1500 (--harness goose): it exited without launching the agent (smoke-test death, ward#222/#264/#595), so it did no work and the launch intent it took is retracted. Nothing is running on this issue. It needs re-dispatch. A ward agent director re-queues it automatically. A manual ward agent retry no longer needs --override-reservation.

— Goose, via ward agent

<!-- ward-agent-reservation-released --> <!-- ward-needs-redispatch --> WARDED_WORKFLOW: reservation-released <details><summary>release details</summary> Run never started. `ward container reap` released container `engineer-goose-ward-1500` (`--harness goose`): it exited without launching the agent (smoke-test death, ward#222/#264/#595), so it did no work and the launch intent it took is retracted. Nothing is running on this issue. It needs re-dispatch. A `ward agent director` re-queues it automatically. A manual `ward agent` retry no longer needs `--override-reservation`. </details> <!-- ward-agent-signature --> — Goose, via `ward agent`
Author
Member

WARD-WORKFLOW: done

details

review summary: in-container review gate intentionally skipped because the temporary ward default pending brokered QA.
workflow: merge-remote-main; review summary: in-container review gate intentionally skipped because the temporary ward default pending brokered QA.
implementation felt: straightforward once the smoke probe classifier was isolated; the only wrinkle was preserving redaction while surfacing useful Claude stderr/json detail.
confidence: high; ward exec build, ward exec test, ward exec vet, and ward exec lint passed after rebase. Promote run 2517 and release run 2518 were green. Homebrew refresh skipped in-container because brew is unavailable; installed ward remains v0.823.0 here.
surprises: aosguard ops forgejo tasks list could not resolve its SSM token, so I verified through the Forgejo Actions API with the injected token.
follow-ups: none.

WARD-WORKFLOW: done ✅ <details><summary>details</summary> review summary: in-container review gate intentionally skipped because the temporary ward default pending brokered QA. workflow: merge-remote-main; review summary: in-container review gate intentionally skipped because the temporary ward default pending brokered QA. implementation felt: straightforward once the smoke probe classifier was isolated; the only wrinkle was preserving redaction while surfacing useful Claude stderr/json detail. confidence: high; `ward exec build`, `ward exec test`, `ward exec vet`, and `ward exec lint` passed after rebase. Promote run 2517 and release run 2518 were green. Homebrew refresh skipped in-container because `brew` is unavailable; installed ward remains v0.823.0 here. surprises: `aosguard ops forgejo tasks list` could not resolve its SSM token, so I verified through the Forgejo Actions API with the injected token. follow-ups: none. </details>
Author
Member

WARD-WORKFLOW: reservation-released

release details

Run finished with WARD-WORKFLOW: done ✅.

ward container reap released container engineer-codex-ward-1500 (--harness codex): the terminal outcome supersedes the reservation, so a later redispatch no longer needs --override-reservation.

— Codex, via ward agent

<!-- ward-agent-reservation-released --> WARD-WORKFLOW: reservation-released <details><summary>release details</summary> Run finished with `WARD-WORKFLOW: done ✅`. `ward container reap` released container `engineer-codex-ward-1500` (`--harness codex`): the terminal outcome supersedes the reservation, so a later redispatch no longer needs `--override-reservation`. </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/ward#1500
No description provided.