-
-
Notifications
You must be signed in to change notification settings - Fork 40.2k
Closed
Description
Description
When using the gateway tool to modify configuration mid-conversation with Claude Sonnet 4.5 or Opus 4.5, the session becomes corrupted. Subsequent messages fail with:
LLM request rejected: messages.X: tool_use ids were found without tool_result blocks immediately after: call_XXXXXXXX
Steps to Reproduce
- Configure clawdbot with
anthropic/claude-sonnet-4-5as primary model - Start a conversation via WhatsApp
- Ask the bot to modify its own configuration (triggers
gatewaytool) - Send another message after the config change completes
Expected Behavior
The conversation should continue normally after configuration changes.
Actual Behavior
The session file contains orphaned tool_use blocks without matching tool_result blocks, causing the Anthropic API to reject the request.
Logs
17:44:28 tool start: gateway toolCallId=call_48325266
17:44:28 tool end: gateway toolCallId=call_48325266
17:48:19 LLM request rejected: messages.55: tool_use ids were found without tool_result blocks immediately after: call_48325266
Workaround
Delete session files after the error occurs:
rm ~/.clawdbot/agents/main/sessions/*.jsonl
clawdbot gateway restartEnvironment
- Clawdbot version: 2026.1.24-3
- Provider: Anthropic (claude-sonnet-4-5)
- Channel: WhatsApp
- OS: Ubuntu
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels