#My OpenClaw always hung in the midway

1 messages · Page 1 of 1 (latest)

torpid perch
#

I have added session state logging, added prompt in agents.md and heartbeat.md to check and resume hanged tasks, and increased the timeout limit of LLM - it still paused without notifying and would not pick up until I asked.

What could be the issue? Could you guys share some tips please?

worldly lodgeBOT
wooden rampartBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

worldly lodgeBOT
gentle egretBOT
#

I’m checking the docs/code path for this, because “it just pauses until I poke it” usually has a few specific causes.

#

What you added makes sense, but my first guess is this:

the main session lane is getting stuck, so heartbeat never gets a chance to “rescue” it.

A few important gotchas here:

  • AGENTS.md / HEARTBEAT.md only affect behavior once a turn is actually running
  • diagnostics.stuckSessionWarnMs / session logging help detect hangs, they do not unstick them
  • heartbeat is main-session, so if that lane is already busy/stuck, it can get skipped as requests-in-flight

That would match “it only woke up when I asked again”.

Please check these first and paste the output:

openclaw --version
#
openclaw status --all
openclaw system heartbeat last
openclaw tasks list
openclaw tasks audit
openclaw logs --follow

What I’d look for in logs:

  • heartbeat skipped with reason=requests-in-flight
  • stuck session: ... processing
  • No output for ... It may be waiting for input.

A few concrete tips:

  1. If this is detached work (ACP/subagent), inspect tasks, not heartbeat
#
   openclaw tasks list
   openclaw tasks show <taskId-or-runId>
   openclaw tasks notify <taskId-or-runId> state_changes

By default, ACP/subagent tasks are often done_only, so mid-run stalls can feel “silent”.

  1. Do not rely on heartbeat to recover a wedged main turn
    Heartbeat can be skipped when the session is already busy. For watchdog/recovery, isolated cron or detached tasks are usually better than “please resume hung work” in HEARTBEAT.md.

  2. Make sure heartbeat is not skipping for a boring reason
    Common ones are:

    • quiet-hours
    • empty-heartbeat-file
    • no-tasks-due
    • alerts-disabled