🦞OpenClaw Guide
Sessions

Tool Use Error — Unexpected tool_use_id

LLM request rejected with 'unexpected tool_use_id found in tool_result blocks'. Quick fix inside.

⚠️ The Problem

The bot fails mid-conversation with: `` LLM request rejected: messages.24.content.1: unexpected tool_use_id found in tool_result blocks: toolu_01VXP4dBvqNB7SZVmfDB6adX. Each tool_result block must have a corresponding tool_use block in the previous message.

🔍 Why This Happens

This happens when the conversation history becomes internally inconsistent. The error means there's a tool result in the history that references a tool call that doesn't exist (or was removed). Common causes: - A tool call crashed mid-execution - Session was interrupted during a tool run - Context compaction removed a tool_use but kept its result - Very long threads with lots of tool usage

The Fix

The fix is simple — start a fresh session. Send this in the same chat where it's failing:

bash
/new

Or use /reset as an alternative.

This clears the broken history and starts fresh. Your memory and preferences are preserved.

If this happens repeatedly, please report it as a bug:

https://github.com/openclaw/openclaw/issues

🔥 Your AI should run your business, not just answer questions.

We'll show you how.$97/mo (going to $197 soon)

Join Vibe Combinator →

📋 Quick Commands

CommandDescription
/newStart fresh session (preferred)
/resetAlternative to /new
openclaw logs --since 10mCheck logs for more context

Related Issues

🐙 Your AI should run your business.

Weekly live builds + template vault. We'll show you how to make AI actually work.$97/mo (going to $197 soon)

Join Vibe Combinator →

Still stuck?

Join our Discord community for real-time help.

Join Discord