Repository navigation
Conversation
Quest-Claim: 6ff3c06ce426ad3a
…st-managed provider Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s to Claude Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 53 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Maintainer decision (2026-11-22,
(Written by Opus 5.5) |
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. The check sits in prepare(), which builds every Claude reviewer environment. So the stored login can't reach a gateway with no credential on any path, and a host-managed session runs on the stored login without env -u.
Reviewed changes
This run reviewed the full PR at 087f904. That covers the prepare() routing change, its docs and help text, the new tests, and the quest bookkeeping.
-
Host-managed provider: when
CLAUDE_CODE_PROVIDER_MANAGED_BY_HOSTis truthy,prepare()runsstrippedEnvironment(userEnv)before anything else. That drops everyANTHROPIC*/CLAUDE*variable exceptCLAUDE_CONFIG_DIR, so the review uses the stored login. The logged-out error now says the host's route was ignored. -
Bare-gateway refusal:
bareGatewayrefuses before Claude Code runs, even before its status check, when all of these hold:ANTHROPIC_BASE_URLis set, noCLAUDE_CODE_USE_*switch is on, and there is noANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKEN, orAuthorizationline inANTHROPIC_CUSTOM_HEADERS. It throwsReviewerUnavailableErrorwith the reason"gateway without credential", so the round passes over every Claude model as a logout does. Skip reasons are free-form strings inreview-record.ts, so the new reason needs no parser change. -
Helpers:
enabled/claudeProviderspull out the switch test thatroutesalready used.authorizesmatches the header name case-insensitively and needs a non-empty value. -
Docs and help: the README and
--helpdescribe both behaviours and limit the claim to Claude. -
Tests: new fake-CLI tests cover:
- a bare gateway, logged in and logged out, including a tenant header, an
X-Authorizationdecoy, andCLAUDE_CODE_OAUTH_TOKEN - an
Authorizationheader passing - a cloud switch skipping the check
- host-managed sessions with and without a stored login
test/review.test.tspasses locally (111/111). - a bare gateway, logged in and logged out, including a tenant header, an
-
Quests: the finished quest is removed, and
quest/m0/review-codex-gateway-credential.mdtracks the same leak in Codex.
claude-opus-5-5 | 𝕏
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Applied the pick round's decision: the keep of (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run reviewed the delta since 087f904.
- Quest note: recorded the maintainer's keep decision in the Plan of
quest/m0/review-codex-gateway-credential.md. It is documentation only, with no code change.
claude-sonnet-5-5 | 𝕏

Finishes quest/m0/review-route-credential.md.
Summary
quest reviewpassedANTHROPIC_BASE_URLto the Claude reviewer even when the environment held no credential for it, so Claude Code sent the user's stored OAuth login to whatever gateway that URL named. Inside a T3 Code session, where the host pointsANTHROPIC_BASE_URLat its own gateway and setsCLAUDE_CODE_PROVIDER_MANAGED_BY_HOST=1, the reviewer instead reported "not logged in", so every agent had to wrap reviews inenv -u ANTHROPIC_BASE_URL.prepare()insrc/cli/review.tsnow:CLAUDE_CODE_PROVIDER_MANAGED_BY_HOSTset to a value Claude Code treats as on): drops every route, connection setting, and credential from the environment and reviews on the stored login. The flag itself was already stripped. With no stored login, it fails as logged out, and the error says it ignored the host's route.ANTHROPIC_BASE_URLset, no cloud provider switched on, and no gateway credential: refuses before Claude Code runs, even before its status check. The error names what to set:ANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKEN, anAuthorizationheader inANTHROPIC_CUSTOM_HEADERS, or unsetting the URL. Like a logout, this passes the round over every Claude model.--helpand the README describe both.Choices made (for review)
Authorizationheader inANTHROPIC_CUSTOM_HEADERScounts as a gateway credential. Tested against Claude Code 2.1.325: it replaces the stored login's bearer, and the OAuth token appears in no header. Any other custom header, such asX-Api-Keyor a tenant header, still let the OAuth bearer through, so onlyAuthorizationcounts. Header names match case-insensitively, oneName: valueper line.CLAUDE_CODE_OAUTH_TOKENalone is not a gateway credential. It is a login, and sending it to a gateway is the leak itself. When it sits beside a real gateway credential it still passes; the test below shows the gateway credential wins.CLAUDE_CODE_USE_BEDROCK=1,ANTHROPIC_BASE_URLreceived no requests.Validation
Reproduced the leak first. A local listener logged request headers while
claude -pran withANTHROPIC_BASE_URLpointed at it:Authorization: Bearer sk-ant-oat01-…(the stored OAuth login), three times;CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST=1,claude auth statusreportedloggedIn: falseand the run printed "Not logged in".Real CLI, bare gateway.
env -u CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST quest review --harness claudeexited 3 with the new error before launching Claude.Real CLI, inside this T3 session (host-managed flag and
ANTHROPIC_BASE_URLset).reviewerEnvironment("claude", …)returned noANTHROPIC_*orCLAUDE_*variables, andclaude -pwith that environment repliedokon the stored login. Noenv -uwas needed.Second, independent check: a sweep against real Claude Code. For each environment, the reviewer environment
prepare()builds was run against the header-logging listener:CLAUDE_CODE_OAUTH_TOKENonlyAuthorizationcustom headerANTHROPIC_AUTH_TOKENANTHROPIC_API_KEYANTHROPIC_AUTH_TOKEN+CLAUDE_CODE_OAUTH_TOKENTests. New fake-CLI tests cover the bare gateway (logged in and logged out), the
Authorizationheader, a cloud switch, and host-managed sessions with and without a stored login. All four bare-gateway and host-managed tests fail against the oldreview.ts.just checkandjust testpass: 1581 tests passed, 5 skipped.Public API
Behavior change, no
!.quest reviewandreviewerEnvironmentnow refuse a Claude gateway with no credential (previously they sent the stored login), and drop a host-managed provider. No wire impact.Caused by
ANTHROPIC_BASE_URLto the reviewer without requiring a credential for the gateway (found by person)Follow-ups
openai_base_urland no key, Codex 0.167.1 sent its stored ChatGPT login (Bearer <JWT>andchatgpt-account-id) to a local listener. With a stored login,quest reviewalso stripsCODEX_API_KEY, so a gateway's key loses to that login. This quest's Goal covers only Claude, and Codex needs its own decision about the status check (codex login statusignoresCODEX_API_KEY). Kept by the maintainer: ✅ keep (rejected: drop), pick round.Decisions
/quest-merge(rejected:/quest-iterate, skip).quest/m0/review-codex-gateway-credential.md: ✅ keep (rejected: drop), recorded in its Plan.Related
src/cli/review.ts, in reviewer routing by risk rather thanprepare(). Expect a merge if it lands first.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm A)
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, XS, arm A)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 3597891
Base: origin/main at 1fa61e8
Risk: high,
It changes the credentials `quest review` gives the Claude reviewer: under CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST it now strips the host's gateway route, provider switches, and credentials and runs on the stored login, and a gateway with no credential is refused before launch, which breaks existing T3 Code and gateway review setups; a revert restores the old routing, but reviews already run on the changed credentials until then, so the reviewer's credentials are what it changes.Classified: high by Claude Code, claude-haiku-5-5, low effort, session
e30e160c-903b-46ef-9617-33aec2f2c4a0Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a2054e-f954-7571-9f4a-c607c7087d13, round 3Score: 9/10,
The incremental change only records a maintainer decision in a quest document and introduces no actionable issues; runtime validation of the overall change remains unverified.Rounds: 3; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Reviewer: Claude Code, claude-sonnet-5-5, medium effort, second
Session:
133acced-44be-49b7-a826-50f88e5886d9, round 3Score: 8/10,
Since the last review the only change is a plan note in a quest file recording that the Codex follow-up is kept, so no new findings arise and the earlier concerns stay settled.Rounds: 3; first round 8 (high 1, medium 4, low 3); findings 8 (high 1, medium 4, low 3): fixed 3, refuted 5, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, high effort, shadow
Session:
01a2054e-f954-7470-a0f9-6b7be0a540cfRounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0