{"version":"2.1.280","anchor":"new-detection-for-misordered-system-role-messages-in-api-e","canonical_anchor":"new-detection-for-misordered-system-role-messages-in-api-e","heading":"New detection for misordered 'system' role messages in API errors","tier":"internal","area":"Error Handling","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280\/e\/new-detection-for-misordered-system-role-messages-in-api-e","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280","markdown":"### New detection for misordered 'system' role messages in API errors\n\nClaude Code now recognizes API errors about misplaced 'system' role messages and pinpoints the offending message\n\n**Unclear.** What Claude Code does with the detected error or message index beyond parsing it is not stated.\n\n**What**\n\nClaude Code can now detect a specific class of API error: when the API complains that a `system` role message needs to come before or after other messages, or that the top-level `system` parameter should be used instead for the initial system prompt. A new parser extracts the index of the offending message from the error text when it's present.\n\n**Why**\n\nThis allows Claude Code to recognize and potentially handle this error condition more precisely, since it can now identify exactly which message in the conversation caused the problem.\n\n- Area: Error Handling\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}