Files
claude-ai-fix[bot]andClaude Opus 5 16e2c6aac5 ci(triage): catch a malformed credential, not just a revoked one
The token was replaced at 08:25 and the runs at 08:26 still failed — with a
different error, which this gate did not recognise:

  "Invalid auth token · Fix external auth token · Invalid Authorization header
   value from CLAUDE_CODE_OAUTH_TOKEN: it contains a line break at character 62
   (110 characters on 2 lines)."

  "error": "invalid_request", "api_error_status": null

No "authentication_failed", no 401 — so the gate added a few hours earlier
reported this as a generic workflow fault, which is exactly the unhelpful
message it existed to replace. Two shapes of the same problem inside a week:
revoked (401) and malformed (invalid_request, reason only in the message text).

Detection now also matches the text marker, but only on an object the SDK
itself flagged with is_api_error_message — an issue body that merely mentions
the secret's name cannot fake one, and a false positive would change only the
message since this branch exits 1 regardless.

The SDK's own wording is more useful than anything inferred here ("a line break
at character 62" names the exact defect), so it is now quoted verbatim in the
annotation, and the remedy says to re-enter the secret as a SINGLE line.

Verified against both real execution-file shapes captured from production —
today's malformed failure and the 08-30 revoked one — plus regression that
max_turns still escalates, generic failures keep the generic message, and an
issue mentioning CLAUDE_CODE_OAUTH_TOKEN is not misreported as a credential
fault.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 10:29:49 +02:00
..
2025-06-10 09:12:33 +00:00
2025-06-10 10:08:28 +02:00
2022-01-01 11:21:36 +01:00
2022-01-12 12:27:28 +01:00
2022-02-18 19:45:17 +01:00
2022-02-18 19:45:06 +01:00
2024-05-17 13:53:45 +00:00
2026-08-28 16:15:39 +00:00
2026-08-28 16:15:39 +00:00
2026-08-30 23:12:32 +00:00
2026-08-30 23:12:32 +00:00