Skip to content

fix(server): archiving a parent keeps children with a dev server or running command - #988

Merged
badcuban merged 2 commits into
mainfrom
fix/live-work-counts-terminal
Nov 18, 2026
Merged

badcuban merged 2 commits into
mainfrom
fix/live-work-counts-terminal

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Archiving a parent archived its children that still had a dev server running in the background or a command still running in their terminal. Archiving stops a thread's runtime and closes its terminals, so that work was killed.

Archiving now counts every background task and every live terminal command when it decides which children are still at work. Those children are separated and keep running, as busy children already were. The automatic archive now stops only the children the archive actually took along, read back from the events it wrote, the same way the manual archive does. The move's wait rule uses the same two shared checks, with no change in behavior.

…unning command

Archiving a parent archives its settled children, which stops their runtime
and closes their terminals. The live-work check behind that split ignored
background work the agent doesn't wait on (a dev server) and commands still
running in the child's terminal, so archiving the parent killed them.

childHasLiveWork takes a `running` option that also counts both; the archive
cascade asks for it, so such children are separated and keep running, as the
auto-archive sweeper already treats them. The background and terminal checks
are shared helpers (hasBackgroundWork, hasLiveCommandRun) that the move's
workWaits uses too, so the two can't drift. Other callers keep their meaning.
The sweeper stopped every attached child of an archived parent, including
ones the archive separated because they still had a dev server or a
running command. It now reads the children back from the events the
archive wrote, as the manual archive does, through one shared helper.
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 18, 2026 4:41am UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit fd3d305 Nov 18, 2026
24 checks passed
@badcuban
badcuban deleted the fix/live-work-counts-terminal branch November 18, 2026 05:02

This branch was previously deployed

1 inactive deployment
Preview — 9f109527 Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant