[BUG] Desktop app auto-switches model to claude-opus-4-7[1m] without user input (ANSI escape leak)

Resolved 💬 3 comments Opened Apr 25, 2026 by prochoim Closed Apr 29, 2026

Bug Description

The Claude Desktop app (v2.1.119, macOS) automatically runs /model claude-opus-4-7[1m] without any user input, overriding the user's configured model (claude-opus-4-6). This happens repeatedly — observed 3+ times in a single day across different sessions.

Key Observations

| Evidence | Detail |
|---|---|
| ANSI leak | Model name includes [1m] (ANSI bold escape fragment), suggesting internal terminal output is leaking into the command parser |
| Duplicate execution | Always fires exactly twice, within 1ms — indicates a duplicate event handler registration |
| No user trigger | User did not type /model. Confirmed by checking: keybindings.json (absent), settings.json (set to claude-opus-4-6), hooks (only notification hooks), plugins, and skills — none contain model-switching logic |
| Desktop-only | All occurrences have entrypoint: "claude-desktop" in the JSONL log |

Reproduction Evidence (JSONL)

Three separate sessions on the same day, same pattern:

Session 1 (16:45:46 UTC):

{"type":"user","message":{"content":"<command-name>/model</command-name>\n<command-args>claude-opus-4-7[1m]</command-args>"},"timestamp":"2026-04-25T16:45:46.340Z","entrypoint":"claude-desktop"}
{"type":"user","message":{"content":"<command-name>/model</command-name>\n<command-args>claude-opus-4-7[1m]</command-args>"},"timestamp":"2026-04-25T16:45:46.341Z","entrypoint":"claude-desktop"}

Session 2 (17:49:43 UTC):

{"type":"user","message":{"content":"<command-name>/model</command-name>\n<command-args>claude-opus-4-7[1m]</command-args>"},"timestamp":"2026-04-25T17:49:43.406Z","entrypoint":"claude-desktop"}
{"type":"user","message":{"content":"<command-name>/model</command-name>\n<command-args>claude-opus-4-7[1m]</command-args>"},"timestamp":"2026-04-25T17:49:43.406Z","entrypoint":"claude-desktop"}

Session 3 (18:33:18 UTC):

{"type":"user","message":{"content":"<command-name>/model</command-name>\n<command-args>claude-opus-4-7[1m]</command-args>"},"timestamp":"2026-04-25T18:33:18.771Z","entrypoint":"claude-desktop"}
{"type":"user","message":{"content":"<command-name>/model</command-name>\n<command-args>claude-opus-4-7[1m]</command-args>"},"timestamp":"2026-04-25T18:33:18.772Z","entrypoint":"claude-desktop"}

Environment

  • App: Claude Desktop v2.1.119
  • OS: macOS (Darwin 25.4.0), MacBook Air M1
  • Configured model: claude-opus-4-6 in ~/.claude/settings.json
  • Plugins: visualize@careerhackeralex, telegram@claude-plugins-official (neither contains model-switching code)

Expected Behavior

The model should remain claude-opus-4-6 as configured in settings.json. No /model command should be executed without explicit user input.

Actual Behavior

The desktop app silently runs /model claude-opus-4-7[1m], switching the active model to opus-4-7. The [1m] ANSI bold fragment in the model name suggests the app is parsing its own terminal-formatted output and feeding it back as a command.

Workaround

Manually run /model claude-opus-4-6 after each occurrence.

View original on GitHub ↗

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