Repository navigation
fix(takeover): close session input before teardown - #316
Merged
Merged
Conversation
This was referenced Oct 8, 2026
3 tasks done
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.
Teardown now closes agent input before it releases a display, so a delayed input call for a torn-down session can no longer reach a display that a new session reused.
How it works:
.<id>.input-closedmarker sits next to the takeover identity marker. Retention and pruning leave it in place, and it reserves the id.AgentPermitUnavailableError, so evidence records them asnot-attempted.desktop+androidsessions drain before any retention.This replaces the #213 part of #305. An earlier revision of this PR used an abstract Unix socket lock. Review and CI showed it fails between Node 20 and Node 22+ and across network namespaces, so it was removed.
Closes #213
qa-213/r3/run.logJ3session destroyruns; new click during drainnot-attemptedqa-213/r3/run.logJ2session prune --all-stoppedqa-213/r3/run.logJ4Checks: lint, typecheck, build,
GSK_RENDERER=cairo PICKFORGE_REQUIRE_BROWSER=1 bun run test:coverage(3,073 passed, 6 skipped, thresholds unchanged), PickCheck clean. One earlier full run hit a load flake in an unchanged browser abort test, filed as #318. xterm is not installed on this host, so its live tests did not run.Reviews: Astra and Fable at xhigh, four repair rounds, all findings resolved. Follow-ups: #317 (marker growth), #318 (browser abort test flake).
QA used an isolated
PICKFORGE_HOMEand product-created desktop sessions. Evidence lives outside the repo in the batch 5 artifacts folder (qa-213).