Bug: Tool results lost when prompt ends before tool completion
Resolved 💬 3 comments Opened Feb 7, 2026 by felipeosmar Closed Feb 11, 2026
Description
When executing tools (especially exec), the tool result is sometimes lost because the prompt/run is marked as completed before the tool result is processed.
Error Message
[openclaw] missing tool result in session history; inserted synthetic error result for transcript repair.
Logs Evidence
embedded run tool start: runId=044d9c4f... tool=exec
embedded run prompt end: runId=044d9c4f... ← PROMPT ENDS
run cleared ← RUN CLEARED
exec failed: ... ← TOOL RESULT ARRIVES AFTER
embedded run done: aborted=false
The sequence shows that prompt end and run cleared happen before the tool result is received.
Environment
- OpenClaw version: 2026.2.6-3
- OS: Linux 6.17.0-14-generic (x64)
- Node: v25.5.0
- Model: claude-opus-4-5
Steps to Reproduce
- Start a session and execute multiple tool calls
- Sometimes (timing-dependent) the tool result arrives after the run is marked complete
- This causes the result to be lost and replaced with a synthetic error
Expected Behavior
Tool results should always be captured before the run is marked as complete.
Workaround
Avoiding parallel tool calls and waiting for responses seems to reduce the issue.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗