claude-code - 💡(How to fix) Fix Bug: Opus 4.7 (1M context) rejects requests with role 'system' is not supported on this model

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

API Error: 400 role 'system' is not supported on this model

Fix Action

Fix / Workaround

Workaround: Fall back to standard Opus 4.7 or Sonnet 4.6 (200K context), which work fine in the same directory.

Code Example

API Error: 400 role 'system' is not supported on this model
RAW_BUFFERClick to expand / collapse

Environment

  • Client: Claude Code (Claude Max)
  • Model: Opus 4.7 (1M context)
  • Platform: Windows 11
  • Setup: Multi-agent project with .claude/agents/*.md subagent definitions (5 agents), project-level CLAUDE.md, and multiple MCP servers configured

Symptom

Every message — even a fresh /clear followed by a plain greeting — fails immediately with:

API Error: 400 role 'system' is not supported on this model

The error is 100% reproducible and fires before any meaningful turn can complete.

Confirmed

  • Switching to standard Opus 4.7 or Sonnet 4.6 in the same directory works normally.
  • The project files, MCP servers, and subagent definitions are valid — the standard endpoint accepts them without issue.
  • The problem is specific to the 1M context endpoint, which appears to apply stricter validation on the role: 'system' field that Claude Code uses internally to serialize CLAUDE.md, subagent prompts, and/or MCP server descriptions.

Expected Behavior

The 1M context endpoint should accept the same request shape that the standard Opus 4.7 endpoint accepts, since Claude Code generates the same payload regardless of which model the user selects.

Impact

1M context mode is currently unusable in any project directory that has substantial CLAUDE.md content or subagent configurations — which is exactly the use case 1M context is designed for.

Workaround: Fall back to standard Opus 4.7 or Sonnet 4.6 (200K context), which work fine in the same directory.

Suggested Fix

Either:

  1. Relax the 1M context endpoint validation to match the standard endpoint, or
  2. Have Claude Code rewrite system-role payloads into the format the 1M endpoint expects before sending.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Bug: Opus 4.7 (1M context) rejects requests with role 'system' is not supported on this model