[BUG] /model and /effort mutate global settings.json — breaks agents/fleet view; no way to configure per-agent model or effort
Summary
/model and /effort write to ~/.claude/settings.json immediately and globally. In the agents/fleet view (claude agents) this means there is no supported way to run a fleet of agents with intentional, independent model and effort configurations.
Environment
- Claude Code: 2.1.169
- Platform: Windows 11
The problem
~/.claude/settings.json is a single shared file. Every Claude Code session reads from it on start. /model and /effort both write to it immediately on invocation.
The slash commands look and feel like session controls, not "save my settings" commands. In a single session this is a confusing default. In the agents/fleet view it becomes a correctness bug:
- You have three agents running: one on Opus doing deep analysis, one on Sonnet doing fast search, one on Haiku doing summarisation.
- The Sonnet agent completes a phase and a skill invokes
/effort high. - Any agent started after that point inherits
higheffort on whatever model that last write left behind. - There is no warning. There is no way to know which agent last mutated the shared state.
Launch ergonomics compound this: when you spawn a new agent from the fleet view, it inherits whatever settings.json currently contains — not the model or effort you intended when you hit "new agent." There is no way to launch an agent with an explicit, intentional model/effort configuration other than CLI flags, which must be known before the session starts and cannot be changed once running.
Note: v2.1.169 fixed background agents ignoring ANTHROPIC_MODEL env values — confirming that even the env var workaround for model configuration was broken for background agents until yesterday.
Steps to reproduce
- Open
claude agents - Launch agent A on Opus — note current model/effort
- Launch agent B — in that session run
/modeland select Sonnet - Launch agent C from the fleet view
- Agent C starts on Sonnet, not Opus
Expected behaviour
/modeland/effortshould be session-local by default and should not write tosettings.json.- A distinct, explicit action — e.g.
/model save,--saveflag, or a dedicated/settings set modelcommand — should be required to persist a change. - When launching a new agent from the fleet view, the model and effort should be specifiable at launch, independently of any global default.
- Each agent in the fleet view should maintain its own model/effort state for its lifetime.
Related issues (all closed as stale or duplicate without a fix)
- #20745 — Model setting changes globally across all sessions (regression)
- #27608 — Status bar shows stale model after settings.json change from another session (closed as duplicate)
- #27627 —
/modelcommand is global, not per-session (closed as duplicate of #27608) - #36288 —
/modelaffects all concurrent sessions instead of being per-session (closed as duplicate) - #37303 —
effortLevelnot persisted for Max mode; model/effort have no per-session isolation - #47820 —
/effortsession command does not overrideeffortLevelinsettings.json - #49076 —
/modelsilently persistseffortLeveltosettings.json, overriding user's preferred default (closed as duplicate) - #49166 —
/effortis global across concurrent sessions instead of session-scoped - #53416 —
/effortsetting is global across sessions instead of per-session (closed as duplicate of #49166) - #65598 — feat: support effort level in agent definition frontmatter (open — feature request for the same gap)
- #66346 —
effortLevelinsettings.jsonnot honoured on session start (open)
This issue is not a duplicate of any of the above. Those issues cover single sessions and concurrent terminal sessions. This issue covers the agents/fleet view, where the lack of per-agent launch configuration means there is no supported way to run agents with intentional, independent model and effort settings.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗