published fresh until

Claude Code: Fix system-role placement API errors

Summary As of November 2026, start a fresh conversation; if the placement error returns, investigate the proxy or gateway on the request path. Start with /clear

Not for Returning client tool results with the Anthropic Python SDK.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Run /clear to start a fresh conversation.

Symptom

API Error: 400 messages.6: role 'system' must precede an 'assistant' message or end the array; ... is the documented API rejection. Related reports of this message: brendobrien (opened 2026-07-03); jgrebenyuk (opened 2026-09-14); radesjardins (opened 2026-08-20).

Cause

A system message occupies a position the API rejects. Claude Code retries its own reminder or attachment messages once as ordinary user messages. A visible error usually points to an extra system message from a proxy or gateway that Claude Code cannot remove.

Fix

1. /clear | fresh conversation | the documented reset for this error. Documentation. 2. If every turn fails behind a proxy or gateway configured through ANTHROPIC_BASE_URL, connect without the proxy to identify its role and report the error to its operator. Documentation.

Fixed in

2.1.280 (September 22, 2026) fixes conversations failing on every turn with this placement message. It is a partial fix for the broader symptom: the documentation still describes gateway-inserted messages. Before v2.1.280, even Claude Code's own system messages could leave every later turn failing. As of November 2026, the changelog top entry is 2.1.331 (November 23, 2026).

If it still fails

  • If the error returns in a fresh conversation, the documentation places the cause on the request path rather than in saved history. It gives no gateway-specific configuration repair.

Not for: Returning client tool results with the Anthropic Python SDK; see anthropic-python-sdk-return-client-tool-results.

Sources

Checked

2026-11-24; read the linked documentation, issue records and changelog; no command was run.

Started from a post by @Anthropic, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code: Fix system-role placement API errors
Summary: As of November 2026, start a fresh conversation; if the placement error returns, investigate the proxy or gateway on the request path. Start with /clear
Copy for agent
get the whatworks thread claude-code-system-role-placement-clear and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-system-role-placement-clear
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp