Skip to content

Regression: Heartbeat exec completion still shows generic fallback text instead of actual output #90452

Closed

Description

@bizzle12368239

Version: 2026.6.1 (2026.5.28 installed, updated today)

Heartbeat still shows malformed exec completion text instead of actual command output.

Steps to reproduce:

  1. Create a HEARTBEAT.md that includes an exec step (e.g. tail -5 ~/.openclaw/workspace/memory/2026-06-04.md)
  2. Wait for heartbeat to fire

Expected: Heartbeat shows the actual output of the exec command

Actual: Heartbeat shows generic fallback text:
⚠️ 🛠️ show last 20 lines of ~/.openclaw/workspace/memory/2026-06-04.md failed

This matches the exact pattern described in issues #66382 and #66487 (both marked CLOSED). Either this is a regression or the fix was incomplete.

Relevant links:

Environment:

  • Host: ubuntu (Linux 6.8.0-124-generic)
  • Node.js: v24.13.1
  • OpenClaw: 2026.6.1

Activity

  1. clawsweeper commented on Jun 4, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 4, 2026, 3:43 PM ET / 19:43 UTC.

    Summary
    Keep open. Current source and v2026.6.1 include the earlier exec-completion payload-drop fixes, but this report gives a fresh v2026.6.1 reproduction with fallback text, so it is not safe to close as implemented or as a duplicate of the closed related reports.

    Reproducibility: no. high-confidence current-main reproduction is established yet. The reporter gives concrete v2026.6.1 steps, but current source and tests already cover the older queued exec-completion payload path, so the remaining path needs a fresh repro.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.
    • Include redacted logs or terminal output.

    Next step
    A repair lane can start by creating the missing regression proof, but it should stop without broad refactoring if the reported HEARTBEAT.md exec-step path cannot be reproduced.

    Review details

    Best possible solution:

    Add a focused regression that matches the reported HEARTBEAT.md exec step on current main, then fix the specific heartbeat exec relay path that loses stdout/stderr or emits the fallback failure text.

    Do we have a high-confidence way to reproduce the issue?

    No high-confidence current-main reproduction is established yet. The reporter gives concrete v2026.6.1 steps, but current source and tests already cover the older queued exec-completion payload path, so the remaining path needs a fresh repro.

    Is this the best way to solve the issue?

    Unclear. Closing as implemented would be the wrong solution because v2026.6.1 already contains the earlier fixes; the maintainable path is to reproduce the new HEARTBEAT.md exec-step symptom and repair only that remaining relay path.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The exact remaining failure path is unresolved because the existing source and tests cover the older queued exec-completion bug, while this report may involve a HEARTBEAT.md-triggered exec tool failure path.
    • No live reproduction was run in this read-only review, so the issue needs a focused current-main or v2026.6.1 repro before selecting the final fix.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against d3e595966935.

    Label changes

    Label changes:

    • add P1: The report describes a current-release regression in a real heartbeat exec workflow that replaces command output with user-visible fallback text.
    • add impact:message-loss: The actual command output is not delivered to the user and is replaced by a fallback failure message.
    • add issue-rating: 🦐 gold shrimp: Current issue advisory state selects this label.
    • add clawsweeper:needs-info: Current issue advisory state selects this label.

    Label justifications:

    • P1: The report describes a current-release regression in a real heartbeat exec workflow that replaces command output with user-visible fallback text.
    • impact:message-loss: The actual command output is not delivered to the user and is replaced by a fallback failure message.
    Evidence reviewed

    Acceptance criteria:

    • node scripts/run-vitest.mjs src/infra/heartbeat-events-filter.test.ts
    • node scripts/run-vitest.mjs src/infra/heartbeat-runner.ghost-reminder.test.ts
    • node scripts/run-vitest.mjs src/agents/bash-tools.test.ts

    What I checked:

    • Current exec prompt embeds event text: Current buildExecEventPrompt formats pending exec completion events and includes eventText in the user-relay prompt rather than saying the result is only in prior system messages. (src/infra/heartbeat-events-filter.ts:118, d3e595966935)
    • Heartbeat selects queued exec completion events: Current heartbeat prompt resolution filters pending system events through isExecCompletionEvent and passes those event texts into buildExecEventPrompt. (src/infra/heartbeat-runner.ts:1182, d3e595966935)
    • Heartbeat consumes inspected exec completion events: Current heartbeat code selects exec completion events for consumption, avoiding the old repeated-peek behavior after a heartbeat run handles them. (src/infra/heartbeat-runner.ts:1273, d3e595966935)
    • Regression coverage exists for the old payload-drop path: The adjacent heartbeat regression tests assert that exec completion details reach the prompt and that consumed exec events do not drop later generic events. (src/infra/heartbeat-runner.ghost-reminder.test.ts:386, d3e595966935)
    • Latest release has the same relevant runtime logic: The diff from v2026.6.1 to current main for the heartbeat exec-event files is comments only, so there is no later main-only runtime fix that would justify closing this as implemented on main. (2e08f0f4221f)
    • Release provenance checked: v2026.6.1 points at commit 2e08f0f, matching the reporter's latest-release context rather than proving a newer fix. (2e08f0f4221f)

    Likely related people:

    • steipete: Blame on the current heartbeat prompt and event-consumption code in this checkout points to the current import commit, and earlier history shows Peter split and revised heartbeat event filtering and relay prompts. (role: recent area contributor; confidence: medium; commits: 315cdd42fb05, e2362d352d14, 5a431f57fc18; files: src/infra/heartbeat-events-filter.ts, src/infra/heartbeat-runner.ts, src/infra/heartbeat-events-filter.test.ts)
    • jalehman: Recent history on the exec completion path includes work preserving Telegram topic routing and deduping replayed exec finished node events. (role: recent exec-completion contributor; confidence: high; commits: 29142a9d4764, 5dcf526a4344; files: src/agents/bash-tools.exec-runtime.ts, src/infra/heartbeat-runner.ghost-reminder.test.ts, src/gateway/server-node-events.ts)
    • Michael Appel: History shows a focused change extending exec completion detection for local background exec formats, which is directly adjacent to this report's event classification path. (role: adjacent exec-event owner; confidence: medium; commits: 19a2e9ddb5a8; files: src/infra/heartbeat-events-filter.ts, src/infra/heartbeat-events-filter.test.ts)
    • vincentkoc: Vincent authored the v2026.6.1 release commit and prior heartbeat exec-event auth-inheritance work, making this useful release-regression routing context. (role: release and adjacent heartbeat contributor; confidence: medium; commits: 2e08f0f4221f, a30214a62494; files: src/infra/heartbeat-runner.ts, src/infra/heartbeat-runner.ghost-reminder.test.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    on Jun 4, 2026
  3. added a commit that references this issue on Jun 8, 2026
    85c5d6f
  4. added a commit that references this issue on Jun 8, 2026
    b2c1de7
  5. added a commit that references this issue on Jun 9, 2026
    cdb715f
  6. locked as resolved and limited conversation to collaborators on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions