Summary
Paperclip agents intermittently get stuck in status=running after their heartbeat run has already completed successfully. Because maxConcurrentRuns=1, no new heartbeat can start — the agent is silently dead to the platform while looking alive. This is a recurring, high-impact production bug that has now manifested at least 5 times on our instance since June 2026.
Recurrence History (our instance)
| Date |
Issue |
Agent |
Impact |
| 2026-06-23 |
[FAI-5776] |
Founding Engineer + DevOps |
~90 min zombie, 3 issues 409/403-locked, pricing build blocked |
| 2026-06-23 |
[FAI-5776] |
DevOps Engineer |
Same incident, concurrent zombie |
| 2026-06-26 |
FAI-6087 (this) |
Founding Engineer |
7h+ zombie, Phase 2 work (FAI-6090) stranded overnight |
| Earlier |
FAI-5355, FAI-5428, FAI-5462, FAI-5686 |
DevOps Engineer |
Multiple silent-run reviews raised |
| Earlier |
FAI-2588 |
Founding Engineer |
"Standing in stale sessions multiple times in one day" |
Every one of these was a productivity kill. An agent that should be building or reviewing sits frozen while the board sees a green "running" status and assumes work is progressing.
What Happens
- Agent runs a heartbeat. Run completes with
status=succeeded.
- Paperclip does not flip
agent.status from running → idle.
lastHeartbeatAt goes stale while agent.status stays running.
- All new wake attempts are rejected (
maxConcurrentRuns=1 concurrency guard).
- Assigned issues collect 409/403 checkout conflicts as if the agent is busy.
- Human or CEO agent must manually intervene: pause → resume (or board-level
runtime-state/reset-session).
Root Cause (as far as we can tell)
The run completion callback / state-machine transition from run.status=succeeded → agent.status=idle is not firing reliably. This appears to be a race or a missed event in the agent lifecycle handler, not reproducible on demand but recurring under normal agentic load.
Why This Keeps Hurting Us
- Our zombie-run watchdog (a 15-min cron we built ourselves as a workaround, [FAI-5939]) was paused by the board on 2026-06-24 — meaning the platform's own lifecycle should handle this, not a user-space workaround.
- The
runtime-state/reset-session recovery endpoint returns 403 Board access required when called from an agent JWT, so agent self-recovery is impossible. Board manual intervention is the only path.
- There is no platform-native alerting beyond "suspicious after 1h / critical after 4h" stale-run checks — by the time an alert fires, hours of work are lost.
Reproduction Steps
We cannot reproduce this on demand, but the conditions are:
codex_local adapter
wakeOnDemand: true, maxConcurrentRuns: 1
- Normal heartbeat run that completes (last observed: run completed ~19:16Z, zombie persisted until ~07:55Z next day — ~12 hours)
Expected Behavior
When a heartbeat run reaches a terminal state (succeeded, failed, cancelled), agent.status must atomically transition to idle (or paused if paused). No manual recovery should be needed.
Requested Fixes / Mitigations
- Fix the state transition so
run.completed → agent.status=idle is atomic and reliable.
- Expose a self-service recovery endpoint (e.g.
POST /api/agents/:id/recover-zombie) callable by agents with their own JWT, not just board-level tokens.
- Platform-native watchdog built into the scheduler — not a user-space cron we have to maintain and remember to keep unpaused.
- Alert loudness — a zombie older than 30 min should be auto-reaped or at minimum surfaced as a board-level notification, not just a stale-run evaluation issue.
Business Impact
Each zombie incident costs 2–12 hours of autonomous agent capacity and requires board-level manual intervention. On a team running autonomous agentic workflows 24/7, this is the single biggest reliability drag we have. We have built two generations of internal workarounds ([FAI-1166], [FAI-5778], [FAI-5939]) and the bug still reappears.
Please treat this as a high-priority platform reliability issue. It is seriously impacting our work and overall productivity
Summary
Paperclip agents intermittently get stuck in
status=runningafter their heartbeat run has already completed successfully. BecausemaxConcurrentRuns=1, no new heartbeat can start — the agent is silently dead to the platform while looking alive. This is a recurring, high-impact production bug that has now manifested at least 5 times on our instance since June 2026.Recurrence History (our instance)
Every one of these was a productivity kill. An agent that should be building or reviewing sits frozen while the board sees a green "running" status and assumes work is progressing.
What Happens
status=succeeded.agent.statusfromrunning→idle.lastHeartbeatAtgoes stale whileagent.statusstaysrunning.maxConcurrentRuns=1concurrency guard).runtime-state/reset-session).Root Cause (as far as we can tell)
The run completion callback / state-machine transition from
run.status=succeeded→agent.status=idleis not firing reliably. This appears to be a race or a missed event in the agent lifecycle handler, not reproducible on demand but recurring under normal agentic load.Why This Keeps Hurting Us
runtime-state/reset-sessionrecovery endpoint returns 403 Board access required when called from an agent JWT, so agent self-recovery is impossible. Board manual intervention is the only path.Reproduction Steps
We cannot reproduce this on demand, but the conditions are:
codex_localadapterwakeOnDemand: true,maxConcurrentRuns: 1Expected Behavior
When a heartbeat run reaches a terminal state (
succeeded,failed,cancelled),agent.statusmust atomically transition toidle(orpausedif paused). No manual recovery should be needed.Requested Fixes / Mitigations
run.completed→agent.status=idleis atomic and reliable.POST /api/agents/:id/recover-zombie) callable by agents with their own JWT, not just board-level tokens.Business Impact
Each zombie incident costs 2–12 hours of autonomous agent capacity and requires board-level manual intervention. On a team running autonomous agentic workflows 24/7, this is the single biggest reliability drag we have. We have built two generations of internal workarounds ([FAI-1166], [FAI-5778], [FAI-5939]) and the bug still reappears.
Please treat this as a high-priority platform reliability issue. It is seriously impacting our work and overall productivity