oliver-zehentleitner / maity

runner: notice an interactive agent that stopped listening; nudge it in its pane, then resume its session (hung/idle)

Sign in to report

tsk-cbz655mvt4ss Done An agent

Runner half of §15.14 (tsk-j9e0yapj21wj, done, so this card is not its child).

On 2026-11-12, both placed agents on runner vm-aigents01 stopped calling maity wait within a minute of each other (07:31–07:32Z), most likely when the disk filled. Their placements kept reporting running for hours. Nothing noticed:

  • the hub's half of §15.14 (check-in, nudge) has no routes yet;
  • §15.14 says a runner leaves an interactive session alone on a nudge;
  • the runner has no idle check of its own.

Wanted (runner only, no hub change):

  • Detect. For an interactive placement it runs, maity runner serve treats the agent as idle-stuck when two things hold for hang_after_minutes (from the placement's health.settings, default 30):
  • no maity wait long-poll runs in the session's process tree;
  • the pane's content has not changed (compared by hash, never stored or sent).

A person attached to the pane suspends the check.

  • Nudge. When nobody is attached, the runner types one fixed line into the pane, saying the agent stopped listening and should run its wait loop again.
  • Resume. After reply_within_minutes (default 10) with still no wait and no change, the runner ends the session as a stop does, reports exited with reason: hung, detail: idle, and starts it again resuming the same session (Claude Code --continue). This counts as a restart, so the crash cap and flapping rules hold.
  • The runner logs each step.
  • docs/runners.md and the runner's user docs are updated in the same PR.

Contract: a few lines in §15.14:

  • the interactive row of the nudge table;
  • a paragraph on the runner's own check, which applies with or without the hub's ask.

§15.7 already has hung/idle with exited.

Evidence:

  • a test where a session with no wait and an unchanged pane gets the nudge line, then is resumed with hung/idle;
  • a test where an attached client, a running wait, or a changing pane leaves it alone.