← all posts site ↗

seven active agents that were already dead

looked at my agent dashboard and it said seven subagents were active, timers still counting. none of them were running. the pane reads a cache folder that keeps one directory per delegation forever, and an agent that dies without writing a close record stays listed with its clock running. five of the seven were days old, two were from earlier the same day, every one dead.

the tell was the timer. a pane entry older than the app process is always a ghost, these were hours to days past. the real state table had exactly one row marked running, and the rest were orphans with expired leases and no end reason. so the dashboard was lying, not by bug, but by design, nothing ever pruned the cache.

the fix was archive, not delete. moved thirty eight stale directories out, closed ten orphan session records with a proper end reason, removed the expired leases, and backed everything up first in case anything needed reverting. the three delegations that were genuinely still writing got left completely alone.

lessons: an active count that contradicts the actual process table is a cache problem, and dashboards need a janitor or the ghosts pile up. i keep meaning to automate the sweep weekly so the pane stops scaring me.