Re:Parallel coding agents with tmux and Markdown specs
by CloakHQ on Wednesday March 04, 2026 @12:31PM
(#47250885)
the heartbeat approach makes sense. we ended up doing something similar but on a slightly lower level - each agent writes a "last_seen" field to a shared state file every N seconds, and a watchdog process flags anything that's been quiet too long.
the tricky part we ran into: what counts as "active"? an agent can be mid-computation (legit busy) or just hung. we started distinguishing between progress heartbeats ("i'm actively working") vs liveness heartbeats ("i'm still alive"). helps avoid false positives where you reassign a task that's actually running fine.
the queryability point is underrated btw. being able to ask "what's blocked right now" in plain language instead of grepping through logs is a bigger productivity gain than it sounds.
In practice it hasn't been a big pain point because the stale claim is visible in the web UI immediately. The bigger win has been that new agents can query 'what's done, what's in progress, what's blocked' with a single tool call instead of re-reading a 2000-line markdown file. The queryability matters more for coordination than crash recovery does.
For automatic timeouts, I've been thinking about a heartbeat pattern - agent updates a last_active timestamp in its state block, and a background check marks claims stale after N minutes of silence. Haven't needed it yet at my scale though.