BUG: Opus 4.7 ignores CLAUDE_CODE_EFFORT_LEVEL and settings.json effortLevel on session start

Resolved 💬 2 comments Opened Apr 23, 2026 by cnighswonger Closed May 27, 2026

Opus 4.7 sessions always start at xhigh effort regardless of CLAUDE_CODE_EFFORT_LEVEL env var or effortLevel in ~/.claude/settings.json. Only the interactive /effort command changes it. This breaks autonomous multi-agent workflows where agents restart without human intervention.

Repro

# Set via env var
CLAUDE_CODE_EFFORT_LEVEL=high claude

# Or set in settings.json
echo '{"effortLevel": "high"}' > ~/.claude/settings.json
claude

Both result in xhigh on Opus 4.7. Session starts at max burn rate.

Root cause (from binary analysis)

The uEH() resolver honors the env var, but a UI-level code path forces xhigh for Opus 4.7 when unpinOpus47LaunchEffort is false — which it is on every fresh session start, regardless of persisted state. The flag is only set to true when the user interactively uses /effort, creating a chicken-and-egg: the programmatic setting works at the API level but the UI overrides it before the first API call.

Additionally, CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING only matches opus-4-6 and sonnet-4-6 model strings — it silently does nothing on opus-4-7. Users who set this env var expecting it to work on 4.7 (as we did) are running at full adaptive thinking cost without knowing it.

Impact

Any multi-agent setup on Opus 4.7 runs at maximum effort + maximum thinking cost on every session start. For a 3-agent team running 24/7, this is 3x the intended quota burn with no programmatic workaround. The only fix is a human typing /effort in each terminal after every restart.

Related: #49538 (UI display bug), #49809 (closed as dup), #50309 (per-teammate effort feature request). This issue is about the env var and settings.json being ignored at the runtime level, not just the UI display.

Expected behavior

CLAUDE_CODE_EFFORT_LEVEL=high and settings.json effortLevel: "high" should be respected on session start for all models including Opus 4.7. The unpinOpus47LaunchEffort gate should not override explicit user configuration.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗