Skip to content

[Bug]: Main-session user task can lose final reply after heartbeat or exec-completion interrupt #65498

@MertBasar0

Description

@MertBasar0

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

When the assistant is handling a longer multi-step user task in the main session, interrupting
heartbeat prompts or system events like Exec completed (...) can cause the original task's final
user-facing reply to be delayed or effectively dropped.

Steps to reproduce

  1. Start a multi-step task in the main session.
  2. Let it use exec / process or otherwise take long enough that a heartbeat/system event can arrive.
  3. Inject a heartbeat prompt or wait for Exec completed (...) system events.
  4. Observe whether the interrupt is handled but the original task does not resume to a final reply.

Expected behavior

A user-requested main-session task should still get a final user-visible reply even if
heartbeat/system events arrive mid-flight.

Actual behavior

The assistant handles the interrupting heartbeat/system event, but the original user request may not
get a reliable final reply unless the user nudges again.

OpenClaw version

2026.4.9 (253ecd2)

Operating system

Linux 6.6.114.1-microsoft-standard-WSL2

Install method

npm global (under ~/.nvm/versions/node/v22.22.2/lib/node_modules/openclaw)

Model

openai/gpt-5.4

Provider / routing chain

openclaw -> openai

Additional provider/model setup details

Session status showed Model: openai/gpt-5.4 · api-key (openai:default) during investigation.

Logs, screenshots, and evidence

Observed in the same direct session on 2026-04-12.

  Examples of interrupting events seen during the session:
  - heartbeat prompt turns that required replying `HEARTBEAT_OK`
  - system events such as `Exec completed (...)` and `Exec failed (...)`

  Observed user-visible consequence:
  - after interrupting events, the user repeatedly had to send messages like:
    - "yine takıldın"
    - "ne yaptın yarım sattir çalışıyorsun neden dönüş yapamadın ?"

  Observed follow-up behavior:
  - the original task often resumed only after the user nudged again

  Relevant local investigation notes:
  - `pending-final-delivery-vs-heart beat-stall-investigation.md`
  - `heartbeat-interupt-stall-minima l-repro.md`

Impact and severity

Affected: direct main-session tasks interrupted by heartbeat/system events
Severity: High (final user-visible reply can be lost or delayed until manual follow-up)
Frequency: Observed multiple times in one session on 2026-04-12
Consequence: the session appears stuck and the user has to manually nudge for completion

Additional information

This appears different from the recent subagent pendingFinalDelivery fixes, which are tied to
SubagentRunRecord completion delivery state. Related but not identical issues: #29762 and
#14191.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:crashProcess/app exits unexpectedly or hangs

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions