Bug: Opus 4.7 (1M context) rejects requests with role 'system' is not supported on this model

Resolved 💬 3 comments Opened May 23, 2026 by frankyminghuan-oss Closed Jun 23, 2026

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.

View original on GitHub ↗

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