openclaw - 💡(How to fix) Fix Session abort after successful tool execution leaves user without confirmation [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#69597Fetched 2026-04-22 07:50:26
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

When a tool call succeeds but the session is aborted by the provider before the assistant can generate a completion response, the user is left without confirmation. The side effects of the tool (e.g., file edit) are already committed, but the user never hears about them. This creates a "silent success" pattern that confuses users.

Error Message

{"type":"message","role":"system","customType":"openclaw:prompt-error","content":"This operation was aborted"}

  • Detection difficulty: High — no error surfaced to user
  1. Session recovery: After prompt-error: aborted, the session should not get stuck — it should recover and continue processing new messages
  • #44610 — Session stops processing after prompt-error: aborted

Root Cause

OpenClaw's architecture separates tool execution from response generation:

  1. Tool executes → returns result to model
  2. Model generates assistant response → sends to user

If the provider aborts between step 1 and 2, the tool's side effects are committed but the user is never notified.

Fix Action

Workaround

We implemented a cron-based completion notifier that scans pending status files and sends Discord notifications for unconfirmed edits. This is a bandaid — the fix should be at the gateway level.

Code Example

{"type":"message","role":"toolResult","toolName":"edit","content":"Successfully replaced 1 block(s) in ~/.openclaw/openclaw.json"}
{"type":"message","role":"system","customType":"openclaw:prompt-error","content":"This operation was aborted"}
{"type":"message","role":"assistant","errorMessage":"This operation was aborted"}
RAW_BUFFERClick to expand / collapse

[Bug]: Session abort after successful tool execution leaves user without confirmation

Bug type

Behavior bug (incorrect output/state without crash)

Summary

When a tool call succeeds but the session is aborted by the provider before the assistant can generate a completion response, the user is left without confirmation. The side effects of the tool (e.g., file edit) are already committed, but the user never hears about them. This creates a "silent success" pattern that confuses users.

Repro Steps

  1. User asks agent to edit a config file (e.g., add a model to openclaw.json)
  2. Agent reads the file, then calls edit tool
  3. Tool returns success: "Successfully replaced 1 block(s) in ~/.openclaw/openclaw.json"
  4. Provider aborts the session with AbortError: This operation was aborted
  5. Assistant response is never generated or sent
  6. User waits indefinitely with no confirmation that the edit succeeded

Evidence

Session transcript (excerpt):

{"type":"message","role":"toolResult","toolName":"edit","content":"Successfully replaced 1 block(s) in ~/.openclaw/openclaw.json"}
{"type":"message","role":"system","customType":"openclaw:prompt-error","content":"This operation was aborted"}
{"type":"message","role":"assistant","errorMessage":"This operation was aborted"}

Result: Edit is committed. User notification is not.

Root Cause

OpenClaw's architecture separates tool execution from response generation:

  1. Tool executes → returns result to model
  2. Model generates assistant response → sends to user

If the provider aborts between step 1 and 2, the tool's side effects are committed but the user is never notified.

Severity

  • User impact: Medium — confusion, frustration, wasted time
  • Frequency: Recurring — detected multiple prior AbortError events in cron logs
  • Detection difficulty: High — no error surfaced to user

Environment

  • openclaw --version: 2026.4.15 (041266a)
  • OS: Ubuntu 24.04
  • Provider: Ollama (kimi-k2.5:cloud)
  • Model: kimi-k2.5:cloud

Workaround

We implemented a cron-based completion notifier that scans pending status files and sends Discord notifications for unconfirmed edits. This is a bandaid — the fix should be at the gateway level.

Proposed Fix

  1. Gateway-level retry: If a session aborts after tool success, the gateway should attempt to send a generic "operation completed" message to the user
  2. Tool confirmation persistence: Tool results should optionally include a user-facing confirmation that survives session aborts (e.g., a message queue that is flushed to the user channel even if the session dies)
  3. Session recovery: After prompt-error: aborted, the session should not get stuck — it should recover and continue processing new messages

Related Issues

  • #44610 — Session stops processing after prompt-error: aborted
  • #64212 — Image tool fails with "Request was aborted" for NVIDIA Kimi K2.5
  • #37505 — Cron job timeout aborts entire model fallback chain via shared AbortController

Labels

bug, bug:behavior, gateway, agents

extent analysis

TL;DR

Implement a gateway-level retry mechanism to send a generic "operation completed" message to the user after a session aborts following a successful tool execution.

Guidance

  • Investigate the proposed fix of implementing a gateway-level retry to send a confirmation message after a session aborts, focusing on the first step: sending a generic "operation completed" message.
  • Review the tool confirmation persistence approach to ensure that user-facing confirmations can survive session aborts, potentially using a message queue.
  • Examine the session recovery mechanism to prevent sessions from getting stuck after a prompt-error: aborted event, allowing the session to continue processing new messages.

Example

No specific code snippet is provided due to the high-level nature of the issue, but an example of a message queue implementation could involve using a library like RabbitMQ or Apache Kafka to store and forward messages even if the session is aborted.

Notes

The provided workaround using a cron-based completion notifier is a temporary solution and should be replaced with a more robust fix at the gateway level. The proposed fixes require further development and testing to ensure they address the root cause of the issue.

Recommendation

Apply the proposed workaround until a more permanent fix can be implemented, as it provides some level of user notification, albeit not ideal. The reason is that the workaround, although band-aid-like, offers a temporary solution to mitigate user confusion and frustration until a more comprehensive fix is developed and deployed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Session abort after successful tool execution leaves user without confirmation [1 participants]