Bug Description
When switching models mid-session from Anthropic (Claude) to OpenAI (GPT-5.2-codex), the session transcript becomes corrupted and all subsequent API calls fail with:
400 Item 'rs_XXXX' of type 'reasoning' was provided without its required following item.
Steps to Reproduce
- Start a session with an Anthropic model (e.g.,
claude-sonnet-4-5)
- Have some conversation with thinking/reasoning enabled
- Switch to an OpenAI model mid-session:
/model gpt-5.2-codex
- The first response from OpenAI generates a
thinkingSignature in the transcript containing OpenAI's reasoning format:
"thinkingSignature": "{\"id\":\"rs_XXXX\",\"type\":\"reasoning\",\"encrypted_content\":\"...\"}"
- Any subsequent message fails with the 400 error above
Root Cause
The OpenAI Responses API requires that a reasoning block (type: "reasoning") be followed by its corresponding content item. When Clawdbot re-submits the conversation history to OpenAI, the orphaned reasoning ID in thinkingSignature causes the API to reject the request.
Expected Behavior
Model switching should work seamlessly. Options:
- Strip/convert provider-specific reasoning metadata when switching providers
- Store reasoning in a provider-agnostic format
- Clear reasoning blocks from history on provider switch
Workaround
Manual fix: edit the session transcript to remove the thinkingSignature field and delete error lines. Or use /reset (loses history).
Environment
- Clawdbot version: 2026.1.16-2
- Channel: Discord
- Models involved:
anthropic/claude-sonnet-4-5 → openai/gpt-5.2-codex
- Thinking/reasoning: was enabled
Transcript excerpt
// Line causing the issue (GPT response with OpenAI reasoning format):
{"message":{"content":[{"type":"thinking","thinkingSignature":"{\"id\":\"rs_07274b...\",\"type\":\"reasoning\",...}"}]}}
// Subsequent errors:
{"stopReason":"error","errorMessage":"400 Item 'rs_07274b...' of type 'reasoning' was provided without its required following item."}
Bug Description
When switching models mid-session from Anthropic (Claude) to OpenAI (GPT-5.2-codex), the session transcript becomes corrupted and all subsequent API calls fail with:
Steps to Reproduce
claude-sonnet-4-5)/model gpt-5.2-codexthinkingSignaturein the transcript containing OpenAI's reasoning format:Root Cause
The OpenAI Responses API requires that a reasoning block (
type: "reasoning") be followed by its corresponding content item. When Clawdbot re-submits the conversation history to OpenAI, the orphaned reasoning ID inthinkingSignaturecauses the API to reject the request.Expected Behavior
Model switching should work seamlessly. Options:
Workaround
Manual fix: edit the session transcript to remove the
thinkingSignaturefield and delete error lines. Or use/reset(loses history).Environment
anthropic/claude-sonnet-4-5→openai/gpt-5.2-codexTranscript excerpt