Description
When a long-running tool call completes (or multiple system messages queue up) and the session context has been compacted in the meantime, the agent receives an error:
No tool call found for function call output with call_id toolu01QevQjBAp63b1ujgzW6SqjR.
This error message then gets delivered to the user's chat surface (e.g., Telegram) as if it were a normal reply.
Steps to Reproduce
- Start a long-running
exec command (e.g., a Python script that takes 10+ minutes)
- While it's running, multiple heartbeat messages arrive and queue up
- Session gets compacted due to context length
- When the exec completes, the tool result tries to deliver to a context where the original tool_call ID no longer exists
- The framework error message leaks as a user-visible reply
Expected Behavior
- Tool results for orphaned call IDs should be silently discarded (or logged internally) rather than forwarded as user-visible messages
- Alternatively, the result could be injected as a system message with the output content rather than as a tool_result
Observed Frequency
Happens multiple times per session during heavy async work (background processes + heartbeats).
Environment
- OpenClaw 2026.2.12
- Model: claude-opus-4-6
- Channel: Telegram
- Heartbeat interval: 30 min
- Trigger: long-running exec processes completing after compaction
Description
When a long-running tool call completes (or multiple system messages queue up) and the session context has been compacted in the meantime, the agent receives an error:
This error message then gets delivered to the user's chat surface (e.g., Telegram) as if it were a normal reply.
Steps to Reproduce
execcommand (e.g., a Python script that takes 10+ minutes)Expected Behavior
Observed Frequency
Happens multiple times per session during heavy async work (background processes + heartbeats).
Environment