You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Empty message content causes Anthropic API errors during compaction #6446
Can't really since I was working on something personal, but I was around
137 messages in, latest Opencode version as of today, using the
oh-my-opencode plugin, when it suddenly just came up with this error
pattern, no matter how many undos I tried. I reinstalled and on a new
session it is somehow is fixed for now? 🤷
Hi, i don't know if this is deployed or not but got the same error on last (1.1.8) version, session not shareable as used under WSL and "copied to clipboard" = no copy. I'm using Azure Inference for Anthropic "azure-anthropic": { "name": "Azure AI Foundry (Anthropic)", "npm": "@ai-sdk/anthropic", "options": { "baseURL": "https://XXXXXXXXXXXXXX-resource.services.ai.azure.com/anthropic/v1", "headers": { "anthropic-beta": "claude-code-20250219,interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14,token-efficient-tools-2025-02-19,context-1m-2025-08-07,context-management-2025-06-27,tool-search-tool-2025-10-19,tool-examples-2025-10-29" } }, "models": { "claude-opus-4-5-20251101": { "id": "claude-opus-4-5-20251101", "name": "Claude Opus 4.5 (200K)", "tool_call": true, "attachment": true, "reasoning": true, "temperature": true, "limit": { "context": 200000, "output": 64000 }, "price": { "input": 15, "output": 75 }, "options": { "thinking": { "type": "enabled", "budgetTokens": 32000 } } }, "claude-sonnet-4-5-2": { // not an error, my deployment name on Azure "id": "claude-sonnet-4-5-2", "name": "Claude Sonnet 4.5 (1M)", "tool_call": true, "attachment": true, "reasoning": true, "temperature": true, "limit": { "context": 1000000, "output": 32000 }, "price": { "input": 6, "output": 22.5 }, "options": { "thinking": { "type": "enabled", "budgetTokens": 16000 } } } } }
Conv was like :
[assistant] sub agent : finished
[assistant thinking] explore task finished, starting dev task (sub agent)
assistant were then starting the new sub agent => all messages must have non empty content
Note: Azure Anthropic is the exact same implementation than Anthropic API, same headers, same way to send API key, ...
I am also still encountering this in version 1.3.2, although using nemotron nano
┃ litellm.BadRequestError: OpenAIException - {"error":{"message":
┃ "request: Value error, message content cannot be empty","type":
┃ "BadRequestError","code":400}}. Received Model Group=nvidia/nvidia/
┃ Nemotron-3-Nano-30B-A3B
┃ Available Model Group Fallbacks=None
Activity
github-actions commentedon Dec 30, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Dec 30, 2025
Can u share a session u got this error w/?
Simply run this:
opencode export > session.jsonAnd send the session
zitongcharliedeng commentedon Dec 31, 2025
+1 I've had to stop using Opus in opencode because of this :(
rekram1-node commentedon Dec 31, 2025
Can u plz send a session :)
zitongcharliedeng commentedon Dec 31, 2025
rekram1-node commentedon Jan 6, 2026
This should be fixed
BouquetAntoine commentedon Jan 9, 2026
Hi, i don't know if this is deployed or not but got the same error on last (1.1.8) version, session not shareable as used under WSL and "copied to clipboard" = no copy. I'm using Azure Inference for Anthropic
"azure-anthropic": { "name": "Azure AI Foundry (Anthropic)", "npm": "@ai-sdk/anthropic", "options": { "baseURL": "https://XXXXXXXXXXXXXX-resource.services.ai.azure.com/anthropic/v1", "headers": { "anthropic-beta": "claude-code-20250219,interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14,token-efficient-tools-2025-02-19,context-1m-2025-08-07,context-management-2025-06-27,tool-search-tool-2025-10-19,tool-examples-2025-10-29" } }, "models": { "claude-opus-4-5-20251101": { "id": "claude-opus-4-5-20251101", "name": "Claude Opus 4.5 (200K)", "tool_call": true, "attachment": true, "reasoning": true, "temperature": true, "limit": { "context": 200000, "output": 64000 }, "price": { "input": 15, "output": 75 }, "options": { "thinking": { "type": "enabled", "budgetTokens": 32000 } } }, "claude-sonnet-4-5-2": { // not an error, my deployment name on Azure "id": "claude-sonnet-4-5-2", "name": "Claude Sonnet 4.5 (1M)", "tool_call": true, "attachment": true, "reasoning": true, "temperature": true, "limit": { "context": 1000000, "output": 32000 }, "price": { "input": 6, "output": 22.5 }, "options": { "thinking": { "type": "enabled", "budgetTokens": 16000 } } } } }Conv was like :
[assistant] sub agent : finished
[assistant thinking] explore task finished, starting dev task (sub agent)
assistant were then starting the new sub agent => all messages must have non empty content
Note: Azure Anthropic is the exact same implementation than Anthropic API, same headers, same way to send API key, ...
sadmansk commentedon Mar 31, 2026
I am also still encountering this in version 1.3.2, although using nemotron nano