• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jokius / rook / 30987892519 / 1
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 05 Aug 2026 08:14AM UTC
Files 95
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Aug 2026 08:07AM UTC coverage: 97.264% (+0.07%) from 97.196%
30987892519.1

push

github

jokius
fix(agent-status): a turn that ends with agents still running is not "done"

`Stop` means the main thread ended its TURN, not that the work is finished. In
a swarm the lead hands the turn back constantly while its backgrounded
teammates keep grinding — "waiting for reports, then the gate" — and the
installed `Stop` → `completed --auto-reset` hook lit the sidebar's done
checkmark and called the user over for nothing.

Neither existing mechanism covers this. The `agent_type` filter drops reports
from subagents; this `completed` comes from the main thread and is legitimate.
The pid ownership check drops reports from a nested agent PROCESS; this one is
the pane's own agent. And no instruction to the agent can fix it: `Stop` fires
AFTER its last action and overwrites whatever it set, and after `Stop` the
agent runs nothing at all.

The payload knows, though. `Stop` carries `background_tasks`, and a live
subagent is an entry with `type` = `subagent` AND `status` = `running` (snapped
live off claude-code 2.1.207; when one finishes its entry DISAPPEARS from the
array rather than flipping status). With one present the wrapper reports
`active --blink` instead, keeping every other flag and dropping only
`--auto-reset`. Nothing needs to re-light the checkmark afterwards: Claude Code
wakes the main thread when the last agent lands, and that next `Stop` carries
an empty array.

Both fields must match on the SAME entry, so this walks the array by index with
`plutil` instead of grepping the payload: with a hung `bun run dev` beside a
finished subagent, `"type":"subagent"` and `"status":"running"` both appear — in
DIFFERENT objects — and a substring match would park the row on `active`
forever. That is not hypothetical; the same class of bug (a nested `agent_type`
inside `background_tasks`) ate a `completed` yesterday, and it has a test now.
A long-running background BASH is deliberately not a subagent for the same
reason: it lives there for hours.

Two accepted trade... (continued)

7216 of 7419 relevant lines covered (97.26%)

4052617.78 hits per line

Source Files on job 30987892519.1
  • Tree
  • List 95
  • Changed 10
  • Source Changed 10
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 30987892519
  • e9901672 on github
  • Prev Job for on master (#30635356145.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc