Skip to content

Send anthropic-workspace-id header in the code-review job - #223

Merged
simonx1 merged 1 commit into
mainfrom
ci/code-review-workspace-header
Sep 1, 2026
Merged

Send anthropic-workspace-id header in the code-review job#223
simonx1 merged 1 commit into
mainfrom
ci/code-review-workspace-header

Conversation

@simonx1

@simonx1 simonx1 commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Root cause of the code-review job's instant failures (~300 ms, 1 turn, $0, is_error:true, no error text): the repo's ANTHROPIC_API_KEY is an identity-linked key, and the API rejects it with:

400 anthropic-workspace-id is required when authenticating with an identity-linked API key

The action sanitizes the error text (anthropics/claude-code-action#880), which is why the logs showed nothing.

Fix: pass the workspace id via ANTHROPIC_CUSTOM_HEADERS step env. Verified locally against a header-dumping server that the Claude CLI forwards this env var onto its API requests as the anthropic-workspace-id header (and that ANTHROPIC_WORKSPACE_ID alone is ignored for API-key auth — it's only read by the workload-identity-federation path).

The claude action self-skips on this PR (workflow-validation guard); real verification happens on PR #221 after merge.

🤖 Generated with Claude Code

The repo's ANTHROPIC_API_KEY is an identity-linked key, and the API
rejects such keys with 400 "anthropic-workspace-id is required" unless
the header is present — the cause of every instant is_error:true/$0
code-review failure since late August. Verified locally that the Claude
CLI forwards ANTHROPIC_CUSTOM_HEADERS onto its API requests (while
ANTHROPIC_WORKSPACE_ID alone is ignored for API-key auth).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@simonx1
simonx1 merged commit 268736d into main Sep 1, 2026
3 checks passed
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