Repository navigation
fix(runtime): guard background subagent recovery across processes - #307
Open
kingsword09 wants to merge 1 commit into
Open
kingsword09 wants to merge 1 commit into
kingsword09 wants to merge 1 commit into
Conversation
Contributor
|
pkg-pr-new preview for commit npx --yes https://pkg.pr.new/zcode-app-cli@1b96d01This preview uses the selected commit. PR updates publish automatically after CI succeeds; kingsword09 can also request a preview with |
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.
Closes #306.
After an abrupt exit, resuming the parent session registered saved subagents as active tasks. The task center offered to stop them, and the native stop path threw when it received a numeric timestamp from the session projection.
This change reads historical tasks through the runtime's subagent query and keeps their results available to
TaskOutput. Stopping a live agent requires its current execution ID, so a stale request cannot cancel a later run.Each new child execution holds an exclusive SQLite lock in its output directory. A second CLI can inspect the task while its owner is alive. After a crash releases the lock, an explicit resume can continue the saved child session. Legacy running records with no verifiable owner are shown as
owner_unknown.Verification
bun run release:buildpassed with the locked 4.0.0 runtime./tasks resumeand model-issuedSendMessageleave the first client's stream alone. After killing the owner, the second client resumed the child and stopped its new stream.