[BUG] Opus 4.7 fails in Desktop Code mode with "role 'system' is not supported on this model"
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?
In the Claude Desktop app's Code mode, every message sent with Opus 4.7 immediately fails with:
API Error: 400 role 'system' is not supported on this model
This happens on every message, in every chat, in every project, with no project instructions, custom styles, or attachments — a brand new chat with a one-word message fails the same way.
Switching the model to Sonnet 4.6 in the same Code mode works fine. Using Opus 4.7 in the Claude Code CLI (terminal) also works fine. The failure is specific to the Desktop app's Code mode + Opus 4.7 combination.
The desktop main log shows the failure originates in the CCD (Code mode / Cowork) request cycle:
[CCD CycleHealth] api_error (success): API Error: 400 role 'system' is not supported on this model
[CCD CycleHealth] unhealthy cycle ... reason=api_error
What Should Happen?
Opus 4.7 should work in Desktop Code mode the same way it works in the CLI and the same way Sonnet 4.6 works in Desktop Code mode.
Error Messages/Logs
2026-05-27 07:11:40 [warn] [CCD CycleHealth] local_589fc5f6-b576-4b50-b2cf-69656b6abfb6 api_error (success): API Error: 400 role 'system' is not supported on this model
2026-05-27 07:11:40 [info] [CCD CycleHealth] unhealthy cycle for local_589fc5f6-b576-4b50-b2cf-69656b6abfb6 (1s, hadFirstResponse=true, reason=api_error)
Steps to Reproduce
Open latest Claude Desktop (Claude 1.7196.0 (2dbd78)), switch to Code start a new session in any project - an error occurs with Opus 4.7.
If switched to Opus 4.6 works normally.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.152
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
❌ Desktop app, Code mode, Opus 4.7 — fails on every message, every chat, every project, with or without project instructions/styles
✅ Desktop app, Code mode, Sonnet 4.6 — works
✅ Claude Code CLI (terminal), Opus 4.7 — works
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗