| … | … | @@ -84,7 +84,39 @@ function extractAuthBoolean(value: unknown): boolean | undefined { | |
| 111 | + | "Could not verify Claude Code authentication status from JSON output (missing auth marker).", | |
| 112 | + | verifyFailurePrefix: "Could not verify Claude Code authentication status", | |
| 113 | + | loginHints: ["run `claude login`", "run claude login"], | |
| 114 | + | }; | |
🟠 High Layers/ProviderHealth.ts:105
The loginHints array in CLAUDE_AUTH_LABELS contains run \claude login`andrun claude login, but the unauthenticatedMessagecorrectly instructs users to runclaude auth login. When the Claude CLI outputs "run claude auth login", parseAuthStatusWithLabelsfails to match because the hints are missing theauth` subcommand, causing unauthenticated status detection to silently fail and potentially return an incorrect "unknown" auth status instead of "unauthenticated".
| 1 | const CLAUDE_AUTH_LABELS: ProviderAuthLabels = { |
| 2 | unknownCommandMessage: |
| 3 | "Claude Code authentication status command is unavailable in this version of Claude Code.", |
| 4 | unauthenticatedMessage: |
| 5 | "Claude Code is not authenticated. Run `claude auth login` and try again.", |
| 6 | jsonParseWarning: |
| 7 | "Could not verify Claude Code authentication status from JSON output (missing auth marker).", |
| 8 | verifyFailurePrefix: "Could not verify Claude Code authentication status", |
| 9 | loginHints: ["run `claude auth login`", "run claude auth login"], |
| 10 | }; |
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file apps/server/src/provider/Layers/ProviderHealth.ts around lines 105-114: |
| 2 | |
| 3 | The `loginHints` array in `CLAUDE_AUTH_LABELS` contains `run \`claude login\`` and `run claude login`, but the `unauthenticatedMessage` correctly instructs users to run `claude auth login`. When the Claude CLI outputs "run `claude auth login`", `parseAuthStatusWithLabels` fails to match because the hints are missing the `auth` subcommand, causing unauthenticated status detection to silently fail and potentially return an incorrect "unknown" auth status instead of "unauthenticated". |
| 4 | |
| 5 | Evidence trail: |
| 6 | apps/server/src/provider/Layers/ProviderHealth.ts lines 106-115 (CLAUDE_AUTH_LABELS definition showing loginHints: ["run `claude login`", "run claude login"] and unauthenticatedMessage: "Run `claude auth login`"); lines 138-148 (parseAuthStatusWithLabels unauthenticated detection logic using loginHints.some((hint) => lowerOutput.includes(hint))); lines 182-188 (fallback to 'unknown' status when no patterns match) |