Skip to content

[Bug]: Heartbeat/background failure can surface generic user-request error in Discord #82708

Description

@rteoo

Bug type

User-facing error / background task classification

Summary

On OpenClaw 2026.5.12 (f066dd2), a background heartbeat run on main failed with a Codex app-server / command-lane timeout and was delivered to Discord with the generic foreground user-request failure text:

Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

The failing lane was a heartbeat lane, not a user-initiated Discord request:

session:agent:main:heartbeat:heartbeat

From the user perspective this looks like a foreground chat request failed, even when user chat may still be available.

Environment

  • OpenClaw: 2026.5.12 (f066dd2)
  • Install: Homebrew-backed global package
  • OS: macOS / LaunchAgent
  • Surface: Discord channel
  • Main model: openai/gpt-5.5 through OpenAI Codex app-server
  • Heartbeat was configured with a Discord target and timeoutSeconds: 90

Private IDs, paths, and auth details are intentionally omitted/redacted.

Observed behavior

A background heartbeat run used the main agent/model and timed out. Logs showed the heartbeat lane and embedded failure shape:

lane=session:agent:main:heartbeat:heartbeat
codex app-server client retired after timed-out turn
Profile openai-codex:... timed out. Trying next account...
CommandLaneTaskTimeoutError: Command lane "main" task timed out after 120000ms
Embedded agent failed before reply: Command lane "main" task timed out after 120000ms

Discord received the generic user-request failure copy suggesting /new.

Expected behavior

Heartbeat/background failures should be classified and mapped separately from foreground user-request failures.

Reasonable behavior would be one of:

  1. suppress visible heartbeat failure by default and log it as heartbeat diagnostic state, or
  2. post heartbeat-specific copy only when configured, e.g.
Heartbeat check failed due to a model/runtime timeout. User chat remains available.

The generic /new guidance should not be posted for background heartbeat failures unless the affected foreground session is actually unusable.

Related issues / PRs

Related but not exact:

Local mitigation

The operator mitigated locally by removing heartbeat: {} from main, keeping heartbeat on a lighter cron-worker, and keeping heartbeat isolated/light-context/skip-when-busy. That fixes this instance, but the product behavior remains confusing when any background heartbeat failure is delivered as a foreground user-request failure.

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions