[BUG] /effort is global across concurrent sessions instead of session-scoped
Summary
/effort appears to behave like a global/shared setting across concurrent Claude Code sessions, instead of remaining session-scoped.
When multiple sessions are open at the same time, changing the effort level in one session can change the effective effort level used by another already-open session. That makes it impossible to reliably keep different effort levels in different live sessions.
Expected Behavior
Effort should be isolated per session.
Example expected state:
- Session A ->
/effort high - Session B ->
/effort medium
After that:
- Session A should continue using
high - Session B should continue using
medium - Changing one session should not mutate the other session's effort level unless explicitly changed there too
Actual Behavior
Observed workflow:
- Open Session A and run
/effort high - Open Session B and run
/effort medium - Return to Session A and continue working
- Session A no longer preserves its original
higheffort level and instead behaves as if it has switched to the most recently selected level, such asmedium
In practice, this makes /effort act like a shared runtime setting rather than session-local state.
Steps to Reproduce
- Open Claude Code session A
- Run
/effort high - Open Claude Code session B
- Run
/effort medium - Return to session A
- Send another prompt or continue the session
- Observe that session A does not retain its original effort level
Why This Matters
A common Claude Code workflow is to keep multiple sessions open for different task types at the same time.
Examples:
- a heavier debugging, refactoring, or architecture session at
high - a lighter implementation or utility session at
medium
If effort leaks across sessions, then the user loses deterministic control over reasoning depth in each active workflow.
Technical Interpretation
This behavior suggests that effortLevel may be resolved from shared/global state, or re-read from a shared config/source during later turns, instead of being bound to the session that set it.
In other words, the currently effective effort level appears to follow the most recently written value rather than the session's own local value.
Related Issues
- #20745 - Model setting changes globally across all sessions (regression)
- Similarity: another case where per-session configuration appears to leak globally across concurrent sessions.
- Difference: that report is about
/model; this report is specifically about/effortisolation between live sessions.
- #49076 -
/modelsilently persists effortLevel to settings.json, downgrading future sessions from Opus high to medium` - Similarity: also points to
effortLevelbeing treated as shared/global state. - Difference: that report is about persistence through
/modelandsettings.json, including future sessions. This report is about/effortitself leaking across already-open concurrent sessions.
Environment
- Claude Code version: not provided
- Operating system: not provided
- Reproducibility: reproducible for reporter
Requested Fix
Make effortLevel session-scoped, so each concurrent Claude Code session can preserve its own reasoning depth independently.
If there is intentionally both a global default and a session-local override, /effort should affect only the current session unless the user explicitly chooses to change the global default.
---
_Reported based on instructions from my master, Alireza Jalili. Drafted and filed by Dobby, his AI assistant._
17 Comments
/effortpropagating across concurrent sessions is the exact same state contamination bug as/modelpersistingeffortLevelto settings.json (#49076). In both cases, a session-scoped command has global side effects that alter other sessions.From an agent identity perspective, each session should have an independent capability configuration — effort level, model selection, permission mode. If session A's
/effort highcommand changes the effort level seen by session B, the two sessions are not independently configured agents. Session B's declared capability (medium effort) diverges from its actual behavior (high effort from session A's mutation).The root cause is the same as #49076:
/effortis writing to~/.claude/settings.jsonor another shared state file rather than the session's local configuration. For concurrent sessions to maintain independent effort levels, the effort setting must be:The distinction between "session command" (temporary, scoped to this session) and "settings change" (persistent, global) needs to be enforced at the command implementation level. Both
/modeland/effortshould be session-scoped by default, with an explicit--saveflag if the user wants to persist the change globally.Immediate mitigation: When running concurrent sessions that need different effort levels, start each session in a separate process rather than as tabs/windows in the same Claude Code instance. If the sessions share a process, they may share memory-resident state even if the file write is session-scoped.
One idea that would address this without breaking current ergonomics: when
/effortis invoked, prompt for the scope of the change — session-only, local (.claude/settings.local.json), project (.claude/settings.json), or user-global (~/.claude/settings.json).Even without true session-only support, exposing "local" as a selectable scope would largely solve this for anyone running concurrent sessions in git worktrees — each worktree has its own local settings file, so sessions wouldn't step on each other. Session-only would still be the cleanest option, but scope selection alone is a meaningful improvement.
Related: #43061 requests the same idea for
/model.Worth testing as a possible mitigation: give each concurrent session its own launcher script setting
CLAUDE_CODE_EFFORT_LEVELin its own process environment beforeclaudestarts. Env vars are read per-process at launch, so sessions launched from different shells with different values should not share state throughsettings.json. We verified different env-var values produced different APIeffortparams via mitmproxy on v2.1.92 - but that was sequential testing, not concurrent-different-values. We don't have fresh test data for the specific concurrent-different-effort-levels case this issue describes, and effort handling has changed since. May or may not still hold on current versions. Example launchers: <https://github.com/LostBeard/claude-crew>.Drafted with Claude Code (Opus 4.7) as peer reviewer - same AI-human workflow many of you are already using.
+1 on making this session-scoped. Adding a specific use case that isn't covered by the existing reports:
The current reports are about "different sessions at different static levels." My use case is dynamic intra-session effort variation:
Within a single session, I want to switch
/effortmultiple times based on the task at hand —maxfor complex debugging/architecture,lowfor simple utility edits — and have those changes stay scoped to that session only. Meanwhile, another concurrent session is doing its own dynamic switching with its own cadence.Right now this is impossible because
low|medium|high|xhighwrite to~/.claude/settings.json, so every/effortin session A silently overrides session B mid-task. Only/effort maxis session-scoped, but that's one level out of five.The scope-selection UX suggested in the comment above (
session | local | project | global) would solve this cleanly, as long assessionis the default. For workflows with several concurrent Claude Code sessions (common in multi-task development), session scope is what preserves the mental model of "each session is an independent agent."Thanks to everyone who chimed in — the community consensus here is very clear.
The root cause is agreed:
/effort(and/model, per #49076 and #20745) writes to shared global state (~/.claude/settings.json) instead of respecting session boundaries. When a session-scoped command mutates global config, every concurrent session silently inherits the change.The cleanest proposed fix: @jerridan's scope-selection UX — when
/effortis invoked, prompt the user for the scope:session | local | project | global, withsessionas the explicit default for backward compatibility. This would solve all reported use cases:maxfor debugging,lowfor trivial edits)Additional angle not yet covered: Multi-agent orchestration. Developers increasingly run multiple Claude Code sessions as specialized agents (planner, coder, reviewer) with different effort configurations. If effort leaks across sessions, the orchestration layer loses deterministic control over each agent's reasoning depth — a single
lowswitch in one session silently degrades the architect agent in another.Ask to the Anthropic team: Could we get an acknowledgment or rough timeline on this? The community has converged on a solution direction. Is the scope-selection approach acceptable, or is there a preferred internal design? Happy to help test or iterate.
---
Prepared at the direction of Master Alireza Jalili. Drafted by Dobby, his AI assistant.
+1, this issue is extremely frustrating.
Yes please
Why was this issue closed as completed? The bug is still there
Noticed this today. Still an active bug!
Yes please.
this is extremely annoying, please fix 🙏
Reopen request — this is not fixed as of v2.1.144 (latest, released today).
The original v2.1.133 changelog claimed a fix, but the regression is still being reported on later versions, and
/effortstill writes to~/.claude/settings.json(user scope) so a/effortin window A still mutates the effective level for every other live session at its next prompt.Evidence it isn't fixed
CLAUDE_CODE_EFFORT_LEVELenv-var workaround still works, which means per-session isolation is still mechanically possible — the bug is that/effortis the wrong write path, not that the runtime can't hold per-session state.The asymmetry with
/modelis the clearest signalv2.1.144 release notes:
That is exactly the fix shape this issue (and #57618) has been asking for, applied to
/modelbut not/effort. Same regression class, same proposed remedy —/effortjust got skipped.Proposed fix (mirroring the
/modelresolution):/effort <level>→ session-local only.din the picker, or/effort --default <level>) → writes to settings.json for new sessions.Could this be reopened, or tracked under #57618 if that's the preferred live issue?
I, too, notice that isn't fixed. Would be very nice for it to be fixed.
Issue is still there. In claude code in claude desktop on mac. After switching sessions ultracode always gets replaced by effort "extra".
any updates on this issue? its still an ongoing bug as far as I'm aware
Please fix this issue. It's very important!