Drop interrupted workers from live agents - #712
Merged
TheGreatAxios merged 3 commits intoAug 28, 2026
Merged
Conversation
TheGreatAxios
commented
Aug 28, 2026
TheGreatAxios
left a comment
Collaborator
Author
There was a problem hiding this comment.
lens: critic
verdict: clean
This branch drops interrupted workers from the live agents list after the linger window and keeps leftover tools from pinning a running slot. The cancelled-linger wording regression found on the first pass is fixed. I found no remaining blocking or should-fix defects.
TheGreatAxios
commented
Aug 28, 2026
TheGreatAxios
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review · Request changes
Stamps finishedAt on interrupt and adds agentLaneIsLive() so the agents strip, sticky poll, and fleet roll-up treat status:"running" + lifecycleStatus:"interrupted" as a lingering row that drops after 4s.
Findings
src/subagent/session-store.ts:1021/:1030-1057+src/tui/agent-progress.ts:132—interruptOnestampsfinishedAtand leaveslifecycleStatus:"interrupted", butfollowupOne(and thesendInputOneinterrupt path at:972-1000) runs the new worker turn without flipping lifecycle back to"running"or clearingfinishedAt(onlyresumeOneat:1076does, gated to"completed"). During the follow-up turn the session isrunning/interrupted/finishedAt=<interrupt time>, so oncenow - finishedAt >= 4000:formatAgentsPanel→null,agentsChromeNeedsSticky→false,fleetProgress.running→0, while tool events are still arriving. Reproduced (interruptOne→ pendingfollowupOne→appendEvent(tool_call.start)at t+9s): branch printspanel: null, sticky: false, fleet.running: 0; main shows the lane● explorer d · interrupted · run_shell still running. This is theinterrupt_agent→followup_task/send_input {interrupt:true}flow exposed bylifecycle-tools.ts:261,319,392. On followup start,mutatelifecycle to"running"and dropfinishedAtthe wayresumeOnedoes, then let the existing.thenre-stamp on completion (checkisSoftInterruptedinagent-fleet.ts:799-811first).src/subagent/agent-fleet.test.ts:925-968— the new test passes withsession-store.ts,agent-fleet.ts, andlifecycle-tools.tschecked out fromorigin/main(bun test src/subagent/agent-fleet.test.ts -t "after interrupt_agent wait-status"→ 1 pass), becauselist_agentsstatus comes fromfleetRecords, whichinterrupt_agentalready flipped. It does not exercise this change.
Notes
s.finishedAt ?? now()keeps the secondinterruptOnefromagent-fleet.ts:741idempotent — correct.- Checks:
bun run typecheck,bun run lint,bun test src/tui/chrome-state.test.ts src/tui/agent-progress.test.ts src/subagent/session-store.test.ts src/subagent/agent-fleet.test.ts src/subagent/lifecycle-tools.test.ts src/subagent/followup-live-agent.test.ts src/tui/shell.test.ts(169 pass).
send_input interrupt and followup_task clear finishedAt and set lifecycle to running so the agents strip stays live through the new turn. Settling an interrupted run no longer re-calls interruptOne, which would overwrite a live follow-up's linger stamp.
TheGreatAxios
force-pushed
the
cl-7175-drop-interrupted-workers-from-the-live-agents-list
branch
from
August 28, 2026 22:12
ec3aa69 to
92f9c00
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
bun test src/tui/chrome-state.test.tspasses, including cancelled-linger and interrupted linger/drop casesbun run checkpassesFixes CL-7175