Repository navigation
Conversation
nwparker
marked this pull request as ready for review
October 23, 2026 20:55
nwparker
force-pushed
the
nwparker/wsl-mover-relaunch-gate
branch
from
October 23, 2026 21:08
4c17bcf to
8687736
Compare
… reopened
After an app relaunch, every live WSL bridge pane read "cannot check" and blocked every
move (awin verify-6, item 5). Root cause: the daemon adapter's hasPty only knows sessions
this app process spawned or reattached. A pane the relaunched window had not reopened is
still running in the daemon and listed by the runtime, but the inspection pre-check read
hasPty=false as terminal_gone, so the probe was unverifiable. Reproduced on macOS with a
two-launch e2e: an idle pane in an unopened workspace inspected as
{verdict:'unverifiable', reason:'terminal_gone'} after the relaunch. The same run showed the
runtime still holds the pane's original paneKey, so the paneKey theory is refuted.
The gate now passes includeUnattached, which skips that pre-check and asks the daemon,
which still refuses a session it no longer runs. Other callers keep the old behaviour.
Co-Authored-By: Claude <[email protected]>
…p arrives awin verify-6 item 5d was inconclusive: p4's stub agent answered, but the preview stayed "agent-working". Replaying the D1b-10 stub's hook payloads through the real hook server and the gate's fact collection shows Stop settles the pane to done and the gate reads ready, so the Stop path is not at fault. The run's screenshot (ev/p4-agent2.png) shows the likely cause: the harness launched the stub twice in p4, and one instance sat at its prompt having fired only SessionStart. The stub fires SessionStart at launch, which Orca's Codex normalizer treats as a turn start, so a stub never given a prompt reads as working. No product change. Co-Authored-By: Claude <[email protected]>
…move gate Co-Authored-By: Claude <[email protected]>
nwparker
force-pushed
the
nwparker/wsl-mover-relaunch-gate
branch
from
October 23, 2026 21:25
8687736 to
6a4f795
Compare
Contributor
Author
|
Contained in the dark landing PR #34059 (its head commit is an ancestor of the landing branch). Closing in favour of it; branch kept. |
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.
ELI5
After Orca restarted, the "move this project into WSL" check said "can't check" for every open WSL terminal, so no move could ever start after a restart. Now the check asks the terminal background service directly, so idle terminals pass and busy ones still block.
What Changed
Before: after an app relaunch, every live WSL bridge terminal read
unverifiablein the move preview, and it stayed that way across re-checks. Idle shells, finished background jobs and killed jobs all looked the same (awin verify-6, item 5).After: idle terminals pass and busy ones still block, exactly as before the relaunch.
Mechanism: the app keeps a list of the terminals it has spawned or reopened, and checks that list before inspecting a terminal. A relaunched window doesn't reopen terminals in projects it hasn't shown yet. Those terminals keep running in the terminal daemon, and the runtime still lists them for the move. The pre-check read them as "gone", though, so the inspection gave up with
terminal_gone, which counts as unverifiable. The move gate now passes a new opt-inincludeUnattachedinspection option. That option skips the pre-check and asks the daemon, which still refuses a session that has really ended. No other caller passes it, so close-tab warnings, polling and adoption are unchanged and pay nothing extra.Also adds a test (no product change) for verify-6 item 5d, the "idle agent stuck at agent-working" report. The test replays the stub agent's hook events through the real hook server and the gate: once Stop arrives, the gate reads ready. The stuck reading came from the test stub, which sent SessionStart at launch. Orca treats SessionStart as the start of a turn, so a stub that never got a prompt read as working. The stub has since been fixed.
Why
hasPtycount every session the daemon still runs would also change adoption cleanup and the renderer's reattach decisions. An opt-in confined to the move gate keeps the change behind the WSL-mover gate.Linked Issue
Internal (WSL-via-orcad tracker, D1b-10 verify-6). Stacked on #32828.
Visual Proof
N/A: no UI change. The gate verdict changes for panes that were reported as "can't check".
Testing
Reproduced on macOS with a two-launch e2e (not committed, because it uses the renderer inspection path, which deliberately keeps the old behaviour). After the relaunch, an idle pane in an unopened project inspected as
{verdict:'unverifiable', reason:'terminal_gone'}.src/main/daemon/daemon-relaunch-unattached-inspection.test.tsuses a real daemon server and a fresh adapter as the relaunched app. It checks:src/main/persistence/moving-wsl-projects/wsl-move-gate-stub-agent-hooks.test.ts.pnpm tc:node; themoving-wsl-projectstests pass.Not yet run on Windows; that's the next awin verify build.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Notes
The behaviour is gated: the option is used only by the WSL move gate, which sits behind
ORCA_INTERNAL_WSL_HOSTS. Not tested over SSH; remote terminals never reach this gate.