Persistent Model Selection Override in Claude Code CLI

Resolved 💬 3 comments Opened Aug 11, 2025 by kylantomita Closed Aug 19, 2025

Bug Description
Even though I have Opus 4.1 selected as my default model in all my sessions of ClaudeCode, you folks somehow seem to be sneaking in SONNET 4 usage. If this is the case, this is unacceptable. I want to have total control over which model I use, and I want that to be persistent across the board. I'm not too sure why I'm seeing like 80% SONNET 4 usage when I have selected to use Opus 4.1 as my default for every single thing.

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 1.0.72
  • Feedback ID: 08b52226-af05-47e3-9946-bf27290cdd51

Errors

[{"error":"Error: Failed to create shell snapshot: \n    at file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1420:737\n    at ChildProcess.exithandler (node:child_process:421:5)\n    at ChildProcess.emit (node:events:507:28)\n    at ChildProcess.emit (node:domain:489:12)\n    at maybeClose (node:internal/child_process:1101:16)\n    at ChildProcess._handle.onexit (node:internal/child_process:305:5)","timestamp":"2025-08-10T13:03:51.527Z"},{"error":"Error: Agent file /Users/kylantomita/opt/development/XCode/Boring-Calendar-App/.claude/agents/agent-analysis-report.md is missing required 'name' in frontmatter\n    at OY8 (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2213:1812)\n    at file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2213:333\n    at Array.map (<anonymous>)\n    at file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2213:269\n    at async file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2213:112\n    at async VuB (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3056:4)\n    at async Object.prompt (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3128:1219)\n    at async DRB (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1733:191)\n    at async Promise.all (index 0)\n    at async Promise.all (index 0)","timestamp":"2025-08-11T16:24:12.862Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:686:8960)\n    at mIA (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:717:7477)\n    at Object.call (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1790:918)\n    at call.next (<anonymous>)\n    at qq8 (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3044:11523)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async XuB (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3044:7800)\n    at async VjB (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2119:822)\n    at async $q8 (file:///Users/kylantomita/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3044:6911)","timestamp":"2025-08-11T16:24:57.519Z"}]

View original on GitHub ↗

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