Skip to content

feat: fail fast on CLI authentication errors (v0.2.4) - #3

Merged
plotarmordev merged 1 commit into
mainfrom
feat/auth-fail-fast
Jul 21, 2026
Merged

feat: fail fast on CLI authentication errors (v0.2.4)#3
plotarmordev merged 1 commit into
mainfrom
feat/auth-fail-fast

Conversation

@plotarmordev

Copy link
Copy Markdown
Owner

Workers now raise a typed WorkerAuthError immediately when the claude CLI reports an auth failure (oauth session expired / not logged in / invalid api key / please run /login), during spawn, TUI ready-wait, or crash — instead of hanging out the full tui_ready_timeout.

Motivation: a downstream deployment burned ~178 serial multi-minute ask timeouts when the CLI OAuth expired, because auth death was indistinguishable from slowness. Auth failures now surface fast and typed so embedders can fall back immediately.

  • New WorkerAuthError(WorkerStartError) carrying the matched marker + output tail
  • Conservative case-insensitive marker set (excludes rate-limit/overload)
  • v0.2.4 + CHANGELOG + README/PROTOCOL-TUI notes; headless deployments should prefer CLAUDE_CODE_OAUTH_TOKEN via the env= parameter
  • Full suite 131 passed; adversarially verified (no token exposure, env pass-through intact)

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

@plotarmordev
plotarmordev merged commit 05754a3 into main Jul 21, 2026
8 checks passed
@plotarmordev
plotarmordev deleted the feat/auth-fail-fast branch July 21, 2026 15:36
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