[BUG] Cloud routine sessions ignore CLAUDE_CODE_EFFORT_LEVEL; effort only controllable via undocumented session_context.effort_level
Summary
Scheduled cloud sessions (routines at claude.ai/code/routines) always launch at the model's default effort. Every documented mechanism for raising effort fails in cloud sessions, even though the model-config docs state CLAUDE_CODE_EFFORT_LEVEL "takes precedence over all other methods." The only control that works is an undocumented effort_level field in the triggers API's session_context — not exposed anywhere in the claude.ai UI.
Environment
- Claude Code on the web / scheduled routines, observed 2026-06-11
- Model:
claude-fable-5(default effort: high); effort verified via the session footer badge
What I tried (each verified by the badge on real runs)
| Mechanism | Result |
|---|---|
| "env": {"CLAUDE_CODE_EFFORT_LEVEL": "max"} in the repo's committed .claude/settings.json | Var IS present in the session shell (echo prints max); badge stays High |
| CLAUDE_CODE_EFFORT_LEVEL=max in the cloud environment's Environment variables (the documented channel for harness vars like CLAUDE_AUTOCOMPACT_PCT_OVERRIDE) | Same — var reaches the shell, badge stays High |
| effortLevel settings key | Rejects "max" by design; known-flaky locally (#65651, #45453) |
| Triggers API: session_context.effort_level: "max" | Works — badge shows Max. The strict CreateSessionRequest proto accepts effort_level while rejecting effort/effortLevel as unknown fields, so the field is real but undocumented |
Repro
- Create a routine via
POST /v1/code/triggerswithmodel: claude-fable-5. - Add
CLAUDE_CODE_EFFORT_LEVEL=maxto the cloud environment's env vars. - Run it with a prompt containing
echo $CLAUDE_CODE_EFFORT_LEVEL→ printsmax, while the session badge shows High. - Update the trigger with
session_context.effort_level: "max"→ next run's badge shows Max.
Asks
- Honor
CLAUDE_CODE_EFFORT_LEVELin cloud sessions per documented precedence — or document that cloud sessions resolve effort from session config only. - Document
effort_levelin the triggers API and/or expose effort in the routines UI.
Related: #55598, #65651