Skip to content

fix(executor): point claude error-pattern failures at /status, not /usage - #469

Merged
umputun merged 1 commit into
masterfrom
claude-error-hint-status
Nov 2, 2026
Merged

umputun merged 1 commit into
masterfrom
claude-error-hint-status

Conversation

@umputun

@umputun umputun commented Nov 2, 2026

Copy link
Copy Markdown
Owner

claude checks limit patterns before error patterns, so an error-pattern match from claude is always a non-limit failure: an expired OAuth token (API Error: 401), "Not logged in", another 4xx or a 500. The run 'claude /usage' for more information hint pointed those at usage limits. In the linked discussion the reporter's first reply to a 401 was "It's not a usage issue for sure".

error-pattern matches now suggest claude /status, which shows the login and account state, same as the codex /status hint codex already prints. Limit-pattern matches keep claude /usage. A new test case covers the expired-token 401.

Related to #235

…sage

Claude checks limit patterns before error patterns, so a PatternMatchError from claude is always a
non-limit failure: an expired OAuth token (API Error: 401), "Not logged in", another 4xx or a 500.
The "run 'claude /usage'" hint sent those users to usage limits, which is the wrong place for an auth
error. Error-pattern matches now suggest `claude /status`, which shows the login and account state,
matching the `codex /status` hint codex already prints. Limit-pattern matches keep `claude /usage`.

Related to #235
Copilot AI balanced review requested due to automatic review settings November 2, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the Claude executor error-hint update.

No open issues 🎉

What changed in this PR

Updates Claude executor error hints to direct authentication and other error-pattern failures to account status rather than usage information.

Changes:

  • Suggests claude /status for error-pattern matches while preserving claude /usage for limit-pattern matches.
  • Updates test expectations and adds coverage for an expired OAuth token returning HTTP 401.
File Description
pkg/​executor/​executor.go Changes the error-pattern help command and updates its field-comment example.
pkg/​executor/​executor_test.go Updates help-command assertions and adds an expired-token regression case.

Review effort: Balanced

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ralphex with  Cloudflare Pages  Cloudflare Pages

Latest commit: 25e8ab4
Status: ✅  Deploy successful!
Preview URL: https://9bd7bb6c.ralphex.pages.dev
Branch Preview URL: https://claude-error-hint-status.ralphex.pages.dev

View logs

@umputun
umputun merged commit 3d3ff40 into master Nov 2, 2026
6 checks passed
@umputun
umputun deleted the claude-error-hint-status branch November 2, 2026 17:02
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.

2 participants