[BUG] /effort session command does not override effortLevel in settings.json
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When effortLevel is set in ~/.claude/settings.json (e.g., "high"), using the /effort max slash command during a session has no effect — the status line continues to display the value from settings.json, and the API calls appear to use the settings file value rather than the session override.
The /effort command exists specifically to allow per-session overrides, but the current precedence logic appears to resolve settings.json at a higher priority than the in-session command, making the slash command a no-op whenever a persistent setting exists.
This is distinct from #30726 (which is about the max value being silently downgraded by the UI). This bug affects any effort level transition via /effort when settings.json defines effortLevel — not just max.
What Should Happen?
The /effort session command should take precedence over settings.json for the duration of the session. The expected precedence (highest to lowest) should be:
- Environment variable (
CLAUDE_CODE_EFFORT_LEVEL) - Session-level
/effortcommand - CLI flag (
--effort) settings.json/settings.local.json- Model default
Fix Proposal
The effort level resolution likely reads from a single source (settings file) without checking for a session-scoped override. The fix would be:
- When
/effort <level>is invoked, store the value in session-scoped state (not insettings.json) - In the effort resolution logic, check session state before falling back to
settings.json - Ensure the status line reads from the same resolved value
Pseudocode:
function resolveEffort():
if env.CLAUDE_CODE_EFFORT_LEVEL: return env value
if session.effortLevel: return session value // ← this check is missing or broken
if cli.effort: return cli value
if settings.effortLevel: return settings value
return model default
Steps to Reproduce
- Set
effortLevelto"high"in~/.claude/settings.json:
``json``
{ "effortLevel": "high" }
- Start a new Claude Code session
- Run
/effort max - Observe the status line — still shows
effort: high - Remove
effortLevelfromsettings.jsonand repeat —/effort maxnow works as expected
Claude Model
Opus
Is this a regression?
I don't know
Claude Code Version
2.1.107
Platform
Anthropic API (Max subscription)
Operating System
macOS (Darwin 25.3.0, arm64)
Terminal/Shell
zsh / iTerm2
Additional Information
Related issues:
- #30726 —
maxeffort silently downgraded by the UI (different: UI overwrites settings value) - #37303 — effort not persisted for Max mode, no per-session isolation
- #40093 — banner shows
maxbut runtime usesmedium
Workaround: Remove effortLevel from settings.json entirely, so /effort commands can take effect during sessions.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗