AI EngineerGuide

prefix_mismatch

OpenAI input_transformations entry reason: "prefix_mismatch".

What it means

Content before this reasoning item was inserted or edited, so GPT-6.2 or later removed the item. The request still succeeded.

On GPT-6.2 and later, you insert or edit content before the reasoning item. For example, rewriting an earlier tool result changes the prefix.

Reasoning models (checked 2026-11-19)

Starting with GPT-6.2, the Responses API drops reasoning items after mid-conversation edits to the conversation history (prefix edits), certain model changes (including downgrades), or changes to the end user or organization.

Latest model (GPT-6.2) (checked 2026-11-19)

Is it yours to fix?

Yes. Your code changed something, so it’s yours to fix.

How to fix it

Don’t insert or edit items before a reasoning item. Append new items at the end of input and replay earlier items unchanged.

An example that produces it (Earlier tool output shortened):

Earlier request
{
  "input": [
    {
      "content": "Run the tests.",
      "role": "user"
    },
    {
      "encrypted_content": "gAAAABrs_1",
      "id": "rs_1",
      "summary": [],
      "type": "reasoning"
    },
    {
      "arguments": "{}",
      "call_id": "call_1",
      "name": "run_tests",
      "type": "function_call"
    },
    {
      "call_id": "call_1",
      "output": "PASS tests/a.test.js\nPASS tests/b.test.js\nFAIL tests/c.test.js\n  Expected 2, received 3\n  at line 14",
      "type": "function_call_output"
    }
  ],
  "model": "gpt-6.2-astra"
}
Next request
{
  "input": [
    {
      "content": "Run the tests.",
      "role": "user"
    },
    {
      "encrypted_content": "gAAAABrs_1",
      "id": "rs_1",
      "summary": [],
      "type": "reasoning"
    },
    {
      "arguments": "{}",
      "call_id": "call_1",
      "name": "run_tests",
      "type": "function_call"
    },
    {
      "call_id": "call_1",
      "output": "FAIL tests/c.test.js",
      "type": "function_call_output"
    },
    {
      "encrypted_content": "gAAAABrs_2",
      "id": "rs_2",
      "summary": [],
      "type": "reasoning"
    },
    {
      "content": [
        {
          "text": "One test fails.",
          "type": "output_text"
        }
      ],
      "role": "assistant",
      "type": "message"
    },
    {
      "content": "Fix it.",
      "role": "user"
    }
  ],
  "model": "gpt-6.2-astra"
}

Related reason codes

All reason codes · Error messages

Last checked 2026-11-19 against the official OpenAI docs.

FAQ

Does deleting old items cause prefix_mismatch?

Not by itself. OpenAI’s reasoning guide says deleting whole items without editing the remaining items, or appending new items after the reasoning item, does not trigger this reason.

How do I change reasoning effort or tools without it?

Append a configuration_update item for effort or format, or an additional_tools item for tools, instead of changing the request-level parameters.