Ultrareview (research preview): review driver dies in cloud sandbox — `CLAUDE_CODE_OAUTH_TOKEN not set`; token never injected from Claude.ai login
Summary
Every /code-review ultra / claude ultrareview run for this account starts a cloud session that initializes cleanly (container ✓, clone ✓, Claude Code started ✓) and then sits idle until archived: "Review failed: cloud session was archived before producing output". The session transcript shows the review driver (run_hunt.sh, registered as a SessionStart hook inside the sandbox) exiting immediately:
=== run_hunt.sh: Starting ===
=== Bug Hunter: Starting Review ===
PR: 17 / 19
Repo: amouen/nashboard
=== run_hunt.sh: OAuth token check ===
ERROR: CLAUDE_CODE_OAUTH_TOKEN not set
The docs say ultrareview "requires authentication with a Claude.ai account" — we are logged in via Claude.ai OAuth (Max 20x, scopes include user:sessions:claude_code), yet the platform never injects the token into the review sandbox.
Environment
- Claude Code CLI 2.1.175, macOS (darwin 25.5.0)
- Auth: Claude.ai subscription OAuth (Max 20x), NOT API key;
/loginre-done fresh same day — no change - Usage credits: ON (launches are accepted and billed)
- Repo: private GitHub org repo (amouen/nashboard), PR mode
Repro (6 failures, 4 distinct paths, same day)
/code-review ultra 17(interactive, ×3) → session starts,run_hunt.sh: CLAUDE_CODE_OAUTH_TOKEN not set, archived empty.- Added
CLAUDE_CODE_OAUTH_TOKEN(freshly minted viaclaude setup-token, verified working with a live inference call) to the cloud environment "Default" env vars via claude.ai/code UI → same error: the ultrareview PR sandbox does not use the user's named environment. claude ultrareview 19(non-interactive CLI) → "Review failed: cloud session was archived before producing output".- Committed the token as
env.CLAUDE_CODE_OAUTH_TOKENin the repo's.claude/settings.jsonon the PR branch (verified locally that settings-env reaches SessionStart hooks) → driver still never produced output. - Mid-session
/code-review ultra 19after fresh/login→ "ultra (cloud review) isn't available in this environment" (stale in-session feature gate; separate minor issue). - Fresh process after
/login→ session initializes, then idle → archived. - Tried editing the hidden
code-review-defaultenvironment (reached via the session's environment badge) to add the env var there → "Failed to update environment. You can try again." — the service environment is read-only. CLAUDE_CODE_OAUTH_TOKEN=<setup-token> claude ultrareview 19(token in the launching shell) → "Ultrareview could not launch: Ultrareview is currently unavailable." — presumably because the env token (inference-only scope) overrides the subscription OAuth that launching requires. So the workaround space is fully closed: launch needs subscription OAuth, the sandbox needs the token, and no user-accessible surface delivers it there.
Expected
The platform injects the launching user's Claude.ai OAuth credentials into the ultrareview sandbox (as documented: "always uses your subscription credentials"), so run_hunt.sh can run the reviewer fleet.
Notes
- Free-run/billing note: several of these dead sessions consumed free runs / credits while producing zero output.
- Session IDs available on request (e.g. session_01PVhMzad7J5VdAVXnJUQcQQ, session_01DM1dV87F8L1Dkg6eqdHgCt, session_011TU6TpreTFPa1CX6SPsUVo).
🤖 Generated with Claude Code