[BUG] /effort session command does not override effortLevel in settings.json

Resolved 💬 3 comments Opened Apr 14, 2026 by shd8 Closed Apr 14, 2026

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:

  1. Environment variable (CLAUDE_CODE_EFFORT_LEVEL)
  2. Session-level /effort command
  3. CLI flag (--effort)
  4. settings.json / settings.local.json
  5. 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:

  1. When /effort <level> is invoked, store the value in session-scoped state (not in settings.json)
  2. In the effort resolution logic, check session state before falling back to settings.json
  3. 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

  1. Set effortLevel to "high" in ~/.claude/settings.json:

``json
{ "effortLevel": "high" }
``

  1. Start a new Claude Code session
  2. Run /effort max
  3. Observe the status line — still shows effort: high
  4. Remove effortLevel from settings.json and repeat — /effort max now 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 — max effort silently downgraded by the UI (different: UI overwrites settings value)
  • #37303 — effort not persisted for Max mode, no per-session isolation
  • #40093 — banner shows max but runtime uses medium

Workaround: Remove effortLevel from settings.json entirely, so /effort commands can take effect during sessions.

View original on GitHub ↗

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