Skip to content

feat(windows): enable structured Codex chat on native Windows - #18519

Merged
brennanb2025 merged 38 commits into
mainfrom
brennanb2025/win-codex-merge-0903
Sep 7, 2026
Merged

brennanb2025 merged 38 commits into
mainfrom
brennanb2025/win-codex-merge-0903

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 24 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​882 $\color{#cf222e}{\Huge{\mathbf{−}}}$​176 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​706
Prod 35 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​443 $\color{#cf222e}{\Huge{\mathbf{−}}}$​210 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​233

Native Windows can now run structured Codex chat. Ownership is gated on a measured capability: the host must prove its process table exposes creation times before any PID is adopted.

Why this is a port, not a merge

This lane predates #18248, which deleted canUseStructuredNativeChat and replaced it with resolveAgentLaunchRoute — still carrying a blanket platform !== 'win32' refusal, the exact refusal this lane removes.

Resolving that conflict the obvious way (take main's deletion) goes green on typecheck and lint while silently dropping the entire Windows enablement. So the gate is ported onto the new router instead.

The gate

resolveAgentLaunchRoute gains three required fields:

  • windowsProcessStartTime: 'available' | 'unavailable' | 'unknown'
  • worktreeUsesWslPath: boolean
  • isWebClient: boolean

Required rather than optional is deliberate. An optional field silently defaults to undefined at any call site that forgets it, which here means silently refusing Windows with no compiler signal. Making them required made the compiler enumerate the call sites — and it immediately found a 7th behind a forwarding wrapper that a grep had missed.

'unknown' is refused: a host that never answered the probe must never have a PID adopted against it.

Paired web clients are refused too. A web client's platform describes the browser's machine, not the host that will run the agent. Before this, a browser on macOS driving a Windows runtime read "not win32", skipped the creation-time proof and allowed structured chat — fail-open, bypassing the guarantee this lane is built on. The refusal is synchronous and fail-closed: no round-trip, no null window, no cache. Paired web gets the legacy chat until the host publishes eligibility itself, which is a separate change.

Bugs found and fixed while merging

  1. resolveStructuredAgentSessionLocation's folder branch tested !target.connectionId, but main removed that field ([Bug]: SSH worktree/terminal operations are validated locally instead of routing to the connected SSH target (DaemonProtocolError: working directory does not exist) #11163 — it spelled "remote", "unresolved" and "local" all as undefined). The check was permanently true; the file is @ts-nocheck, so nothing caught it. Both WSL branches now key on executionHostId.
  2. readWorktreeUsesWslPath threw on an unhydrated store.
  3. A WSL folder workspace routed structured, then got refused after the click. The host refuses by throwing, and callers engage their legacy-terminal fallback on the refusal class, so the throw arrived as a generic RPC rejection: empty workspace, error toast, prompt stranded. Thrown host refusals are now mapped to the refusal class at the launch boundary, so every creation flow degrades to the legacy terminal.
  4. status.get called a probe method the mobile RPC test double didn't implement — a pre-existing lane defect, red at the lane head, invisible because the file wasn't in the lane's test list and the lane had zero CI until this PR.
  5. Stale localization catalogs (the runtime catalog, then an fr.json entry main retired after my merge point — CI validates the PR merged with current base, so both read clean locally).

Windows validation

Run on real hardware (Windows high spec) against the dev build from this branch:

  • Structured session launches on native Windows — PASS
  • Message streams a reply back — PASS
  • Reload reconnects live (post-reload message answered in ~3s, not just transcript retained) — PASS
  • Tab close leaves no orphaned codex.exe — PASS
  • WSL UNC folder degrades gracefully to a legacy terminal with the prompt delivered (the bug in item 3) — PASS
  • Experiment off → working legacy Codex terminal, live pty, no failure toast — PASS

Capability proven on the machine itself: the patched process-tree addon returns creationTimeMs for its own PID, so the gate reads available rather than merely compiling.

One open defect, not from this PR: rapid successive messages duplicated one prompt and dropped another. This PR only decides routing and does not touch message dispatch, so it is very likely a pre-existing structured-chat bug now reachable on Windows. Unattributed — worth confirming on macOS and filing separately.

Proof

  • pnpm tc 0 · full oxlint 0 · changed-code quality 0 findings across 57 files (plain, type-aware, React Doctor)
  • Gate tests ablation-proven in both directions: reverting to the blanket refusal reddens the enablement tests; forcing allow reddens the refusal tests. Neither direction is vacuous.
  • The web-client refusal and the onboarding test fix are each ablation-proven.

Review notes

  • Two review commits were reverted (d54189408f0, 58f963180a6). They correctly identified that the gate should key on the execution host's platform rather than the client's — but the head already did that and refused on unknown, and their version made a synchronous input asynchronous for every desktop user to close a paired-web-only hole, widening a startup race. That hole is closed here fail-closed instead.
  • repos-onboarding-folder-startup.test.ts needed a module mock: the store path now reaches isWebClientLocation(), and the suite stubs window without location. Test-harness artifact — a real renderer always has window.location.

Follow-ups (deliberately not here)

  • Move host facts to the backend and publish per-workspace eligibility, so the renderer stops deciding with facts it has to fetch. Deletes this gate module and gives paired web real support.
  • Windows executable resolution still prefers the .cmd shim over the real .exe, inverted against PATHEXT's own default. Means the PID we hold can be a wrapper — relevant precisely because this PR's identity guarantee rests on holding the right one.

Orca Worker and others added 14 commits August 31, 2026 14:57
# Conflicts:
#	src/main/runtime/orca-runtime.ts
…outer

#18248 deleted canUseStructuredNativeChat and replaced it with
resolveAgentLaunchRoute, which still carried a blanket `platform !== 'win32'`
refusal -- the exact refusal this lane removes. Taking main's deletion would
have gone green on tc and lint while silently dropping the whole Windows
enablement, so the gate is ported rather than merged.

- resolveAgentLaunchRoute now takes a REQUIRED tri-state
  windowsProcessStartTime ('available' | 'unavailable' | 'unknown') and a
  required worktreeUsesWslPath. Required, not optional, so the compiler
  enumerates every call site -- it immediately found a 7th behind a
  forwarding wrapper that a grep of the call sites had missed.
- 'unknown' is refused: a host that never answered the probe must not have a
  PID adopted against it.
- Derivation lives once in agent-launch-routing-windows-gate.ts.
  hasCachedWindowsTerminalCapabilities distinguishes unprobed from probed-false.
- resolveStructuredAgentSessionLocation: both WSL branches now key on
  executionHostId. main's resolveRuntimeFileTarget no longer returns
  connectionId at all, so the folder branch's `!target.connectionId` was
  permanently true; the file is @ts-nocheck so nothing caught it.
- create-intent stubs updated to main's target contract.
- readWorktreeUsesWslPath defaults both store collections: an unhydrated
  store must read as "not WSL", not throw on the launch path.

Gates: pnpm tc 0. Gate tests ablation-proven in BOTH directions -- reverting
to the blanket refusal reddens the 2 enablement tests; forcing allow reddens
the 4 refusal tests. ssh-multi-factor-authentication failures reproduce on
pure origin/main and are not attributable to this merge.
Review found pathUsesWslUnc exported but unused, and the folder composer
hardcoding worktreeUsesWslPath:false. Together those meant a folder picked
under a \\wsl.localhost\ parent routed to structured chat, then got refused
by the host and fell back AFTER the click -- which defeats the lane's own
design goal that create cannot fail after the click.

The group's parentPath is in scope at submit and the workspace is created
under it, so the parent decides WSL-ness pre-click. Wires pathUsesWslUnc
there and adds tests for the helper, including the unhydrated-store case
that previously threw.
@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 9d97d316-ba86-4a6c-bc00-59fcac613577

📥 Commits

Reviewing files that changed from the base of the PR and between aec6fbc and 42702a6.

📒 Files selected for processing (1)
  • src/main/runtime/runtime-rpc-mobile-method-allowlist-fixtures.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Windows process creation-time support to the native process table and validates it with an end-to-end capability probe. Runtime status now reports this capability asynchronously. Structured Windows launches require proven creation-time support and reject WSL worktree paths. Session acquisition and handoff paths recheck provider support before spawning. Codex process spawning now uses shared child-process abstractions. Renderer routing and capability refresh logic consume the new status field.

Merge Risk: 🟡 Moderate · up to 42702

Windows structured sessions now require process-identity proof and reject WSL locations, but creating a new folder may still choose the structured path for a WSL UNC workspace before that refusal is applied. This can produce an unsupported launch flow for affected Windows users and should be resolved before merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.48% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 54 functions across 54 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description gives detailed context, implementation scope, rationale, testing results, known defects, and follow-ups. However, it omits the required Linked Issue section and does not provide the re… Add a Linked Issue entry with the required issue reference. Add the Visual Proof section with before-and-after screenshots or a video; use N/A only if the change has no visual or interaction impact. Complete the applicable Testing, AI Discl…
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the primary change: enabling structured Codex chat on native Windows.
Full details: Description check

Explanation

The description gives detailed context, implementation scope, rationale, testing results, known defects, and follow-ups. However, it omits the required Linked Issue section and does not provide the required Visual Proof section or before-and-after evidence for this behavior change. The template checklist is also not completed explicitly.

Resolution

Add a Linked Issue entry with the required issue reference. Add the Visual Proof section with before-and-after screenshots or a video; use N/A only if the change has no visual or interaction impact. Complete the applicable Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: ba8d94d6-cce7-4b5d-8df0-6a6d1d72a790

📥 Commits

Reviewing files that changed from the base of the PR and between aa78d4a and e68efb2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (57)
  • config/patches/@[email protected]
  • config/scripts/build-windows-process-tree-relay-addon.mjs
  • docs/reference/windows-process-enumeration.md
  • src/main/codex/codex-app-server-client.ts
  • src/main/codex/codex-app-server-session.ts
  • src/main/codex/codex-structured-launch-resolution.test.ts
  • src/main/codex/codex-structured-launch-resolution.ts
  • src/main/codex/codex-structured-location-support.test.ts
  • src/main/codex/codex-structured-location-support.ts
  • src/main/codex/codex-structured-session-adapter.ts
  • src/main/codex/codex-structured-session-state.ts
  • src/main/ipc/runtime.test.ts
  • src/main/ipc/runtime.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-acquisition.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-attach-flow.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-handoff.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-handoff.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-processless-reservation.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-support.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-recovery-exits.test.ts
  • src/main/runtime/orca-runtime-get-status.ts
  • src/main/runtime/orca-runtime-resolve-recovered-structured-tui-transcript.ts
  • src/main/runtime/orca-runtime-status-windows-process-start-time.test.ts
  • src/main/runtime/orca-runtime-structured-agent-session-create-intent.test.ts
  • src/main/runtime/remote-runtime-request-connection.integration.test.ts
  • src/main/runtime/rpc/methods/status.ts
  • src/main/runtime/rpc/methods/updater.test.ts
  • src/main/runtime/runtime-rpc-mobile-terminal-streaming.test.ts
  • src/main/runtime/structured-agent-session-integration-replay.test.ts
  • src/main/runtime/structured-agent-session-integration.test.ts
  • src/main/runtime/structured-agent-session-runtime-exit.test.ts
  • src/main/runtime/structured-agent-session-runtime.test.ts
  • src/main/runtime/structured-agent-session-runtime.ts
  • src/main/windows/windows-process-table.test.ts
  • src/main/windows/windows-process-table.ts
  • src/renderer/src/components/settings/ExperimentalPane.test.tsx
  • src/renderer/src/components/settings/NativeChatExperimentalSetting.tsx
  • src/renderer/src/components/sidebar/folder-workspace-composer-submit.ts
  • src/renderer/src/hooks/composer-state/full-creation-execution.ts
  • src/renderer/src/hooks/composer-state/quick-creation-execution.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/agent-launch-routing-windows-gate.ts
  • src/renderer/src/lib/agent-launch-routing.test.ts
  • src/renderer/src/lib/agent-launch-routing.ts
  • src/renderer/src/lib/launch-agent-in-new-tab.ts
  • src/renderer/src/lib/launch-work-item-direct-route-preparation.ts
  • src/renderer/src/lib/onboarding-folder-agent-startup.ts
  • src/renderer/src/lib/windows-terminal-capabilities-race.test.ts
  • src/renderer/src/lib/windows-terminal-capabilities.test.ts
  • src/renderer/src/lib/windows-terminal-capabilities.ts
  • src/renderer/src/lib/windows-terminal-capability-read.ts
  • src/renderer/src/lib/windows-terminal-capability-reprobe.test.ts
  • src/renderer/src/lib/windows-terminal-capability-reprobe.ts
  • src/shared/child-process/__fixtures__/child-process-import-allowlist.txt
  • src/shared/child-process/child-process-import-boundary.test.ts
  • src/shared/runtime-session-contracts.ts
  • tests/e2e/ssh-docker-transport-drop-recovery.spec.ts
💤 Files with no reviewable changes (1)
  • src/shared/child-process/fixtures/child-process-import-allowlist.txt

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Comment on lines +147 to +149
// The workspace has no store entry until after this decision, so the
// WSL-UNC check cannot run yet; it applies on the next launch.
worktreeUsesWslPath: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Classify the pending workspace path before route selection.

On Windows, worktreeUsesWslPath: false allows resolveAgentLaunchRoute to return structured-native-chat. Both flows pass this value before workspace creation, then enter the structured launch path. Use pathUsesWslUnc with the pending folder path at both call sites.

  • src/renderer/src/hooks/composer-state/full-creation-execution.ts#L147-L149
  • src/renderer/src/hooks/composer-state/quick-creation-execution.ts#L213-L215

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one minor observation inline.

Reviewed changes

This PR removes the blanket platform !== 'win32' refusal that kept structured Codex chat off native Windows, replacing it with a measured capability gate: the host must prove — by reading its own PID's creationTimeMs from the patched @vscode/windows-process-tree addon — that the process table exposes creation times, before any PID is adopted for ownership. Ownership is refused (unknown/unavailable) at every layer, and the two new required router fields make the compiler enumerate call sites.

  • Native addon + build: a hunk on @vscode/[email protected] adds creationTimeMs under a CreationTime = 4 flag (GetProcessTimes / PROCESS_QUERY_LIMITED_INFORMATION), with the relay build asserting the patch landed and repairing a CRLF pnpm materialization.
  • Main-process gate: windows-process-table.ts gains probeWindowsProcessStartTimeAvailability() (single-flight, 30s rate-limit) and a fail-closed isWindowsProcessStartTimeAvailable(); getStatus() drops STRUCTURED_AGENT_SESSION_RUNTIME_CAPABILITY on win32 without proof and status.get/runtime:getStatus await the probe.
  • Ownership re-check: performAttach and acquireNativeHandoffOwner re-check adapterSupportsCreateIfDeclared before and after reservation/drain, settling a drifted reservation processless.
  • Renderer router: resolveAgentLaunchRoute adds required windowsProcessStartTime and worktreeUsesWslPath fields; six call sites pass them.
  • WSL bug fix: resolveStructuredAgentSessionLocation keys on executionHostId instead of the always-true !target.connectionId, and derives folder-workspace WSL distros via parseWslUncPath.
  • Spawn migration: Codex app-server sessions move from node:child_process.spawn to spawnProcess (child-process import pin 158 → 157).

The gate tests abort in both directions, the capability reader validates the enum against real own-PID evidence rather than trusting patched JS, and the process-identity proof is fully fail-closed end to end.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

…-lines

CI static analysis failed: launch-agent-in-new-tab.ts crossed the 300-line
oxlint ceiling. Adding a max-lines disable is forbidden, so the two gate
derivations collapse into one readWindowsStructuredGateInputs() call --
a store-backed site now adds one line and one import name instead of two.
Better shape anyway: one derivation entry point rather than two reads a
call site must remember to pair.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes (since the prior review at e68efb2)

New commit 0428f8a ("decide folder-workspace WSL routing before the click") addresses the one minor finding from the prior review — the unused pathUsesWslUnc helper.

  • First-launch WSL folder routing: folder-workspace-composer-submit.ts now derives worktreeUsesWslPath from pathUsesWslUnc(projectGroup.parentPath) instead of hard-coding false, so a folder workspace created under a WSL parent is classified correctly before the click rather than making a doomed structured attempt and falling back.
  • pathUsesWslUnc wired in: the previously-dead export is now used (and its isWslUncPath dependency handles both \\wsl.localhost\ and legacy \\wsl$\ spellings).
  • New tests: agent-launch-routing-windows-gate.test.ts covers pathUsesWslUnc (both UNC spellings, native, absent path) and readWorktreeUsesWslPath (unhydrated store does not throw; WSL folder workspace is detected).

The parentPath signal is correct — createFolderWorkspace materializes the new workspace under the project group's parent, so a WSL parent reliably implies a WSL child. The three remaining creation flows still defer to "next launch" with worktreeUsesWslPath: false, but those are git-worktree/onboarding paths that remain fail-closed through the main-process supportsCodexStructuredLocation refusal.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes (since the prior review at 0428f8a)

New commit 2aaf7c7c ("collapse the gate derivation to one call, restoring max-lines") is a pure refactor with no behavioral change.

  • Combined gate helper: readWindowsStructuredGateInputs(state, worktreeId) returns both windowsProcessStartTime and worktreeUsesWslPath in one object, so store-backed call sites spread it instead of calling two functions.
  • Call sites: launch-agent-in-new-tab.ts and launch-work-item-direct-route-preparation.ts now use ...readWindowsStructuredGateInputs(...), which preserves the exact same values each field derived before (readWindowsProcessStartTimeGate() defaults to owner local; readWorktreeUsesWslPath still defaults unhydrated collections to "not WSL").

The spread is type-correct against the two now-required router fields, and the values are unchanged — this is a max-lines cleanup, not a semantics change.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Merge Sim added 2 commits September 3, 2026 14:21
Review found a P1 this merge composes: neither parent could reach it. At the
lane head the only structured entry was launch-agent-in-new-tab (full
store-backed WSL check); on main all win32 was refused. The merge enables
win32 in creation flows that pass no projectRuntime, so a WSL folder
workspace, a WSL-configured repo, or a repair-required runtime now routes
structured -- and the host refuses correctly, but by THROWING rather than
returning {ok:false, refusal}.

Callers engage their legacy-terminal fallback on the refusal CLASS, so an
unmapped throw arrives as a generic RPC rejection: no fallback, empty
workspace, error toast, prompt stranded in the launch outbox. Pre-merge the
same action opened a legacy terminal agent.

Map the host's thrown definitive refusals onto the refusal class at the
launch boundary, so every creation flow -- present and future -- degrades to
the legacy terminal instead of stranding. Narrow predicate: unrelated
failures (ECONNRESET, empty message, non-Error) still propagate untouched.

Ablation-proven: removing the mapping reddens the fallback test.
…dded

CI's first-ever run on this lane caught a pre-existing lane defect. The lane
changed status.get to resolve through
runtime.getStatusAfterWindowsProcessStartTimeProbe(), but never taught the
mobile-surface runtime double about it, so status.get failed for mobile
clients with "not a function". The lane's own test list did not include this
file and the lane had zero CI, so nothing ever ran it.

The real runtime always implements the method; the double omitted it.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes (delta against the prior Pullfrog review at 2aaf7c7c)

  • Thrown-refusal mapping — launchStructuredCodexSession now wraps callStructuredAgentSession and maps the host's thrown definitive refusals — the structured_agent_session_unsupported sentinel and the Project runtime requires repair … phrase — onto StructuredAgentSessionCreateRefusalError, so every creation flow (present and future) degrades to its legacy-terminal fallback instead of stranding the prompt in the launch outbox.
  • Narrow-predicate guard — isThrownStructuredRefusal matches only those two markers against an Error message; unrelated failures (ECONNRESET, empty messages, non-Error values) still propagate untouched.
  • Mobile RPC double — createMobileRpcSurfaceRuntime now stubs getStatusAfterWindowsProcessStartTimeProbe, the method status.get resolves through, fixing the "not a function" latent in the mobile surface.

Both markers trace cleanly to their host throw sites (resolveStructuredAgentSessionIntent/the structured gate for the sentinel; getLocalProjectWorktreeGitOptions for the repair phrase), and RuntimeRpcCallError extends Error preserves the message across the local transport, so the predicate sees the real text. The new test is ablation-proven and the transport prefix is covered.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Merge Sim and others added 5 commits September 3, 2026 18:08
…alog

CI static analysis failed on a stale en-runtime-required.json: main added
onboarding integration-capability keys, and the generated catalog is checked
against the PR MERGE result, not the branch alone -- so it read clean locally
while failing in CI. Merging current main (90780ac) and regenerating.

Gates after the merge: pnpm tc 0, oxlint 0, changed-code quality 0/56,
7 gate/lane test files 69 tests green.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes (delta against the prior review at 42702a680)

New commit 47abbd3 ("route structured launches by execution host platform") replaces the client's navigator.userAgent-derived platform with the runtime's authoritative host platform.

  • Execution-host platform — resolveAgentLaunchRoute now takes a required executionHostPlatform: NodeJS.Platform | null instead of platform. windowsStructuredAllowed refuses null (fail-closed) and applies the Windows proof gate to the host's platform, so a browser on one OS can no longer route a session backed by a Windows host without the start-time proof.
  • Host platform read — local-runtime-capabilities.ts gains readLocalRuntimeHostPlatform(), populated from status.hostPlatform alongside capabilities and cleared on error. readAgentLaunchHostPlatform falls back to clientPlatform on native desktop and to null (fail-closed) on paired web until the host answers.
  • Boundary consolidation — the two gate helpers (readWindowsCreationGateInputs, readWindowsStructuredGateInputs) now return { executionHostPlatform, windowsProcessStartTime, worktreeUsesWslPath }, and a caller-census test pins every call site to them.

The host-platform, capability, and start-time signals are all fed by the same refreshLocalRuntimeCapabilities() status read, so the new null/unknown fail-closed paths align with the pre-existing capability gate rather than adding a new failure mode.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes (delta against the prior review at 47abbd3)

New commit 81bfca0 ("recover paired structured session mirror on host swap") closes the gap the 47abbd3 execution-host routing left open: on a paired web client, the local structured-session mirror subscribed through window.api.runtime.subscribe, which never delivers a close notification when the host is swapped, so stale tabs and the previous host's status/capabilities could bleed across the pairing boundary.

  • Host-aware subscription — on web, subscribeCurrent now routes through window.api.runtimeEnvironments.subscribe({ selector: 'active', ... }, { onResponse, onClose: handleSubscriptionTermination }) instead of runtime.subscribe, so an environment swap that closes the child subscription without an RPC end frame still reconnects.
  • Effect restart on host swap — useLocalStructuredSessionTabsSync adds webEnvironmentId (the active environment id, null on native) to its dependency array, so a host swap tears down the mirror and starts it fresh against the new host.
  • Callback refactor — the inline response handler is extracted into onResponse; the shared generation-fenced handleSubscriptionTermination now drives both error/end termination and transport onClose.
  • Tests — a new case drives onClose and asserts the backoff reconnect plus a fresh getStatus capability refresh; the web subscription double (which accepts an { onResponse, onClose } object) is exercised.

The two recovery paths (transport onClose retry and the webEnvironmentId effect restart) are fenced by the existing isCurrent()/disposal generation, so the redundant onClose retry no-ops once the effect has disposed the old sync.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Merge Sim added 4 commits September 4, 2026 01:09
Reverts the two review-loop commits (restoring a tree byte-identical to the
validated head) and closes the hole they were aiming at, without their cost.

A paired web client's `platform` describes the browser's machine, not the host
that will run the agent, so the Windows gate cannot be evaluated there. Before
this, a browser on macOS driving a Windows runtime read "not win32", skipped the
creation-time proof entirely and allowed structured chat — fail-OPEN, the
dangerous direction, bypassing the guarantee this lane is built on.

`isWebClient` is a required input like the other gate fields, so the compiler
enumerated all seven call sites. Refusal is synchronous and fail-closed: no
async round-trip, no null window, no cache to invalidate — unlike keying on an
asynchronously-fetched host platform, which would have made every desktop
launch wait on a round-trip to fix a paired-web-only hole.

Paired web therefore gets the legacy chat until the host publishes eligibility
itself; that is the proper fix and belongs in its own PR.

Ablation-proven: removing the guard reddens both refusal tests; the
desktop-unaffected test is a preservation check and passes either way.
Gates: tc 0, oxlint 0.

Known open: repos-onboarding-folder-startup.test.ts fails on this branch and
passes on plain main — under investigation, NOT caused by this commit.
The web-client refusal added `isWebClientLocation()` to the launch-route
inputs, which this suite's store path reaches while adding the FIRST folder.
The suite stubs `window` as `{ api }` with no `location`, so the function
cleared its `typeof window === 'undefined'` guard and then threw on
`window.location.pathname`.

That threw inside addNonGitFolder's own catch, so folder-1 never activated;
folder-2 then returned early (a project already existed) before reaching the
call at all, leaving exactly one activation with no startup seed.

Test artifact, not a product defect: a real renderer always has
`window.location`, so the seeding path is intact for users. Mocking the module
is the convention 7 other suites already use, and keeps product code free of
defensive branches that only exist to satisfy a stub.

Ablation-proven: removing the mock reproduces the original failure exactly.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes (delta against the prior Pullfrog review at 81bfca0)

The two review commits from the prior round were reverted and replaced with a fully synchronous, fail-closed refusal.

  • Reverted execution-host-platform routing — d54189408f reverts 47abbd3, dropping the required executionHostPlatform router field plus readLocalRuntimeHostPlatform, readAgentLaunchHostPlatform, and readWindowsCreationGateInputs. windowsStructuredAllowed keys on the client platform again, restoring the synchronous launch path for every desktop user.
  • Reverted paired-web host-swap recovery — 58f963180a reverts 81bfca0, so local-structured-session-tabs-sync no longer subscribes via runtimeEnvironments or restarts on webEnvironmentId; the revert leaves no dangling references and is now moot because web is refused structured chat outright.
  • Added a required isWebClient fail-closed refusal — resolveAgentLaunchRoute gains a required isWebClient field and structuredSupported now requires !input.isWebClient. A paired web client's platform describes the browser's machine, not the host that will run the agent, so the gate refuses rather than guessing — legacy terminal until the host publishes eligibility itself.
  • Creation flows pass the gate halves directly — the six call sites spread windowsProcessStartTime: readWindowsProcessStartTimeGate() + isWebClient: isWebClientLocation() (+ worktreeUsesWslPath); the required fields let the compiler enumerate call sites, and the caller-census test was trimmed to pin route owners only.
  • Reprobe settles only after proof — isSettled now requires a win32 host with usable WSL to prove windowsProcessStartTimeAvailable === true before ceasing re-checks, and capabilitySignature includes the flag so a proof change resets backoff.

The refusal is synchronous and fail-closed end to end, the reverted commits' async host-platform state is fully removed, and the paired-web hole is closed by refusing rather than by guessing the browser's OS.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Windows validation — evidence

Captured on real hardware (Windows 11, awin) against the dev build from this branch, driven over CDP. Worktree C:\Users\neil\orca\workspaces\orca\win-hi-18519 at this PR's head.

Capability was proven on the machine before testing, not assumed: the patched process-tree addon returns creationTimeMs for its own PID, so the gate reads available rather than merely compiling.

Structured chat works on native Windows

Structured session launches — a structured native-chat session, not a legacy terminal pane.

A1-structured-launch.png

A reply streams back — OK-18519 rendered in the chat UI, confirming the app inherited working Codex credentials and the turn completed.

A2-exact-reply.png

Reload reconnects live — not merely transcript retention. After reloading the renderer, a new message returned RECONNECTED-18519 in ~3s, proving the session was still live rather than restored from storage.

A4-reload-live-reconnect.png

It is not worse for users who never enable the flag

Setting persists off

B1-setting-off-persisted.png

Legacy path is fully live — with the experiment off, Codex opened a terminal-backed chat with a non-null ptyId, an enabled composer, no launch-failure toast, and a real reply (LEGACY-18519).

B2-legacy-live-response.png

An earlier run failed this check, but that run's dev app had not inherited Codex credentials — every turn died on a missing API key. Re-run with credentials present, it passes. Worth stating plainly since the first result looked like a regression and was not one.

Open defect — not fixed by this PR

Rapid successive messages duplicate one prompt and drop another. Three prompts sent back-to-back settled as Rapid-1, Rapid-2, Rapid-1(dup), R1-18519, Rapid-3, R3-18519 — DOM counts confirm Rapid-1 twice, and R2-18519 never arrived within a 180s bounded wait.

A3-rapid-messages-fail.png

This PR only decides routing and does not touch message dispatch, so this is most likely a pre-existing structured-chat defect now reachable on Windows for the first time. It is unattributed — confirming it on macOS would settle whether it is platform-specific, and it should be filed separately either way.

Also covered, no screenshot needed

  • Closing the chat tab left no orphaned codex.exe (the app-server PID from the run was gone; only pre-existing PIDs remained).
  • A folder workspace on a \\wsl.localhost\... UNC path degraded to a legacy terminal with the prompt delivered — no empty workspace, no error toast. That is the P1 this PR fixes.

Scope of this evidence

This is a dev build, not a packaged one. CI's package (windows) job passes and rebuilds the patched addon — its cache key includes the patch file, so a patch change cannot silently reuse a stale artifact — but launching the packaged artifact and re-reading the probe has not been done.

isWebClientLocation() guarded `typeof window === 'undefined'` and then assumed
`window.location` existed. A window stubbed without a location cleared the
guard and threw on `.pathname`.

That matters because this branch put the call on the launch-routing path,
where the throw is swallowed by the caller's catch and silently becomes a
FAILED LAUNCH rather than a visible error. CI caught it as 9 failures in
launch-work-item-direct.test.ts.

I previously "fixed" this by mocking the module in the one suite I knew about.
That was whack-a-mole against an unbounded set, and it missed this one. The
defect is the partial-window assumption, so fix it there: the mock is removed
from the onboarding suite and both suites now pass on the hardening alone.

Ablation-proven: reverting to the unguarded form reddens 11 tests across the
new unit suite and launch-work-item-direct.

Gates: tc 0, oxlint 0, changed-code quality 0/58.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes (delta against the prior Pullfrog review at c9a9186)

The single new commit 64b2bd7 ("make the web-client check total over a partial window") hardens the paired-web-client gate and drops the test mock that previously papered over its fragility.

  • Total over a partial window — isWebClientLocation() now reads window.location with optional chaining (location?.pathname) and gates the .endsWith('/web-index.html') check behind typeof pathname === 'string', so a window stub lacking a usable location returns false instead of throwing. This matters because the check runs on the launch-routing path, where a throw is swallowed and silently becomes a failed launch.
  • Dedicated test file — web-client-location.test.ts covers all six branches: no window, window without location, location without pathname, the /web-index.html entry path, the __ORCA_WEB_CLIENT__ global marker, and the normal desktop /index.html path.
  • Onboarding mock removed — the now-unnecessary vi.mock('../../lib/web-client-location', …) was deleted from repos-onboarding-folder-startup.test.ts; the store path now calls the real, total function, which answers false against the test's location-less window stub.

The guard is behavior-preserving for real renderers (a genuine window.location.pathname is always a string) and only changes what happens under a partial stub, so the net effect is strictly a robustness improvement. isWebClientLocation is re-exported and consumed in ~30 renderer sites, all of which benefit from it no longer throwing.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Merge Sim and others added 2 commits September 5, 2026 18:15
INTERMEDIATE STATE - typecheck is red by design; stage 2 reconnects the seams.

Main rewrote this lane's subsystem (a65332a moved structured chat onto the
Claude Agent SDK and made the launch layer agent-generic). Every conflict is
resolved TOWARD main so the merge is coherent, which means codex stays refused
on win32 for now - main's behaviour. That is deliberate: enabling codex before
the host probe is wired would leave a window with no gate at all.

Dropped `launch-structured-codex-session.ts` and its test. Main deleted that
module; our refusal->fallback mapping lived in it, and in the merged tree every
production caller already resolved to main's replacement - the only remaining
importer was our own test. The feature was dead code with green tests.

Main's replacement is also strictly better: it classifies by WIRE CODE via
isDefinitiveAgentSessionCreateRefusal and adds a separate
StructuredAgentSessionCreateUnknownOutcomeError, so an unproven create is not
treated as a definitive refusal. Ours matched error-message substrings and would
have called every matched throw definitive - abandoning a session that may
exist. Reference implementations agree: allowlist exact codes, treat timeouts
and disconnects as ambiguous, never act destructively on an unproven refusal.

The @ts-nocheck conflict was imports-only; resolved as a union and each of the
four symbols verified used by hand, since the compiler cannot check that file.

Remaining red, all ours to reconnect in stage 2:
- isWindowsProcessStartTimeAvailable no longer on StructuredAgentSessionRuntimeDeps
- host-handoff test predates main's HostHandoffAccess.findSession + journal API
…Support probe

The renderer no longer decides Codex win32 eligibility: launchStructuredAgentSession
probes agentSession.createSupport for both providers, the host answers via
supportsCodexStructuredLocation (process start-time proof + WSL refusal), and the
create path re-checks live. Deletes the client-side windows gate module and its
routing inputs (windowsProcessStartTime, worktreeUsesWslPath, isWebClient, platform)
from six call sites. Splits killCodexAppServerProcessTree out of
codex-app-server-session to hold the max-lines ceiling without a disable.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Removing the isWebClient refusal silently re-opens the paired-web host-swap gap that 81bfca0 fixed and 58f963180a reverted. The revert's justification ("moot because web is refused structured chat") no longer holds.

Reviewed changes

This delta re-architects the Windows gate out of the renderer: it deletes the client-side refusal module and the required windowsProcessStartTime / worktreeUsesWslPath / isWebClient router fields, and makes launchStructuredAgentSession ask the executing host agentSession.createSupport for both Codex and Claude before create.

  • Renderer gate deleted — agent-launch-routing-windows-gate.ts and launch-structured-codex-session.ts are removed; resolveAgentLaunchRoute keeps only isAgentSessionHandleProvider + executionHostId === 'local' + the runtime capability, so Codex on Windows is no longer refused client-side.
  • Host-side create-support probe for both providers — launchStructuredAgentSession now calls agentSession.createSupport before create for Codex and Claude; the host answers from isWindowsProcessStartTimeAvailable() via supportsCodexStructuredLocation / supportsClaudeStructuredLocation. Thrown host refusals are mapped by code (structured_agent_session_unsupported / method_not_found) rather than message substring.
  • Codex app-server kill extracted + gated — killCodexAppServerProcessTree moves to codex-app-server-process-tree-kill.ts and gates its win32 taskkill /t /f tree-walk behind admitProcessTreeKill (falling back to a handle-addressed SIGKILL on refusal).
  • structuredScope copy updated to describe the host-advertised-support model.

The host is now the single authority for Windows eligibility and answers the question the client used to guess, so a browser on any OS can no longer route a Windows-hosted session past the proof. The renderer capability gate (STRUCTURED_AGENT_SESSION_RUNTIME_CAPABILITY dropped on win32 without proof in orca-runtime-get-status.ts) still fails closed, so the first line of defense is unchanged.

⚠️ Paired-web host-swap recovery is gone, and its justification just went away

Commit 58f963180a reverted the paired-web host-swap recovery (81bfca0) on the explicit ground that the isWebClient refusal made the gap moot — a paired web client could never reach structured chat, so a stale tab mirror did not matter. This delta deletes that refusal. Structured chat is now reachable on a paired web client whenever the host answers the createSupport probe, but the recovery is still absent: useLocalStructuredSessionTabsSync has deps [enabled, ready] (no environment id), and subscription.ts subscribes via window.api.runtime.subscribe with no onClose wiring. On a host swap the renderer never learns the old subscription died, clearLocalStructuredSessionTabs() is only called on feature toggle-off, and the inventory is not environment-scoped — so tabs from the previous host can survive the swap and the new host's sessions never mirror.

The forward fix is already in this branch's history: 81bfca0 subscribed via runtimeEnvironments.subscribe({ selector: 'active', … }, { onResponse, onClose }) and restarted the effect on a webEnvironmentId dep. Either restore that, or confirm (and document) that paired web cannot reach the structured mirror through the creation flows — note launch-agent-in-new-tab.ts already diverts web hosts to launchAgentInWebHostTab before routing, so the tab-bar path is covered; the composer/creation flows that call startStructuredAgentLaunch directly are the open question.

Technical details
# Paired-web host-swap gap re-opened

## Affected sites
- src/renderer/src/lib/agent-launch-routing.ts:94-107 — `isWebClient` refusal removed; `structuredSupported` no longer refuses paired web.
- src/renderer/src/runtime/local-structured-session-tabs-sync.ts:26-46 — `useEffect` deps are `[enabled, ready]`, no environment id; `clearLocalStructuredSessionTabs()` only on toggle-off.
- src/renderer/src/runtime/local-structured-session-tabs-sync/subscription.ts:62-109 — `subscribeCurrent` uses `window.api.runtime.subscribe` with no `onClose`/`onError`.
- src/renderer/src/runtime/local-structured-session-tabs-sync/snapshot-apply.ts — inventory keyed by worktree + version fences, not environment.

## Required outcome
- On a paired web client, a host swap tears down the old host's structured-session tab mirror and re-establishes it against the new host (or paired web is provably never routed into the structured mirror, with the routing invariant stated in code/comments).

## Suggested approach
- Restore the `81bfca0` shape: branch on `isWebClientLocation()` in `subscription.ts` to subscribe via `runtimeEnvironments.subscribe` with `onClose`, and add `webEnvironmentId` (`state.runtimeEnvironments[0]?.id`) to the effect deps with `clearLocalStructuredSessionTabs()` on cleanup.

## Open questions for the human
- Do the composer/creation flows (`folder-workspace-composer-submit`, `full/quick-creation-execution`, `onboarding-folder-agent-startup`) reach `startStructuredAgentLaunch` on a paired web client, or does their `executionHostId` resolve to a non-local runtime that already refuses? Spot-check breadth before choosing between "restore recovery" and "paired web stays out of scope".

ℹ️ Nitpicks

  • The PR description's "The gate" section (three required router fields) and bug-fix item 3 (message-substring thrown-refusal mapping) describe the pre-67f2238 design and no longer match the code. Worth updating so reviewers don't chase a gate that was deleted.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

macOS visual QA (Grok worker, $electron / Playwright CDP)

Isolated dev instance from worktree /Users/brennanbenson/orca/workspaces/orca/loop18519 (brennanb2025/loop18519). Identity: window.api.app.getIdentity() → name=Orca: brennanb2025/loop18519, devLabel=loop18519, devRepoRoot matches this worktree. Electron binary is out/electron-dev/.../Orca: brennanb2025-loop18519.app on CDP 127.0.0.1:9334. Disposable git repo used so Codex did not launch in this worker worktree.

Visible scenario

  1. Settings → Experimental: Chat UI on, Default view = Chat UI, Use updated structured native chat on. Copy on screen: “Windows falls back to it unless Orca can read process start times.”
  2. Opened disposable workspace orca-qa-18519-repo.HxU6Nb.
  3. New tab → Codex (real picker, not a store-only launch).
  4. Codex Chat structured surface opened (Start a chat with Codex, composer, Effort Low / GPT-5.5) — not a PTY/TUI tab.
  5. Sent Reply with exactly: pong. Visible reply pong after ~3s; tab/card status Done.

Backing-state proof

  • Settings: experimentalNativeChat=true, experimentalStructuredNativeChat=true, openAgentTabsInChatByDefault=true
  • runtime.getStatus().capabilities includes agent-session.structured.v1
  • Unified tab structured-agent-session-codex_b940ee2d_8e05_4364_a69f_28862de14bb0: contentType=agent-session, agentSessionAgent=codex, label=Codex Chat
  • Only one PTY tab remains (Terminal 1); Codex is not a terminal tab. Resource Manager stayed at 1 terminal session.
  • Agent pane status done on that structured pane key.

Unverified Windows gap

Native-Windows process-creation proof is outside this local pass. This run did not touch C:/qa18519, did not start Windows validation, and did not prove creationTimeMs / Windows process-table PID adoption. WSL UNC fallback, paired web-client refusal, reload reconnect, and tab-close orphan codex.exe were also not exercised here.

Screenshots were not committed. Local copies: /tmp/orca-qa-18519/screenshots/{02,03,04,05,06}-*.png. Report: /tmp/orca-qa-18519/REPORT.md.

Settings (structured toggle on, Windows copy visible):

02-settings-structured-toggle-enabled.png

New tab → Codex picker:

03-new-tab-codex-picker.png

Structured Codex Chat empty state (full window):

04-codex-structured-chat-empty.png

After send: prompt + pong reply, Done:

05-codex-chat-after-send.png

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in this delta. The Windows eligibility hardening and the identity/detailed process-table split are correct and keep structured chat fail-closed end to end. Not an approval: the paired-web host-swap gap raised in the prior review is unchanged by these commits and remains open.

Reviewed changes (delta against the prior review at 67f2238, commits a7398c07 + a2fcf33):

  • Moved Windows eligibility fully onto the host's awaited probe — getStatus() no longer drops STRUCTURED_AGENT_SESSION_RUNTIME_CAPABILITY on win32 without proof; getStructuredAgentSessionCreateSupport now awaits probeWindowsProcessStartTimeAvailability() and threads the proof into supportsCodex/ClaudeStructuredLocation. Fail-closed is still guaranteed at four layers: the renderer createSupport preflight, the host create re-check, the Codex launch resolver, and the attach-time ownership re-check.
  • Split the Windows process table into identity/detailed projections — readWindowsProcessIdentityTable[Fresh] requests CreationTime only, readWindowsProcessTable[Fresh] requests CommandLine only, and the loader moved to windows-process-tree-loader.ts. Every creationTimeMs consumer (agent-session-process-identity-probe, windows-descendant-exit-verification) migrated to the identity reader; no detailed-table consumer reads creationTimeMs.
  • Batched Windows start-time reads — readProcessStartTimesMs collapses N per-PID scans into one identity snapshot.
  • Hardened the native addon patch verification — creation-time and command-line hunks are now asserted at build and runtime (assertWindowsProcessTreeCreationTimePatch, assertWindowsProcessTreeRuntimeCreationTime), and ProcessInfo is value-initialized so memory is never stack garbage.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Final review status: ready from code/review/CI perspective at bf957c7ac4255bb202b5da35807dee7b70c71170 (MERGEABLE / CLEAN).

What the review changed and verified:

  • Kept the decision host-owned and hardened native-Windows eligibility around verified process creation times, including support-drift fallback persistence, shared Claude/Codex probing, process-table snapshot reuse, and native-addon failure safety.
  • Added/updated focused coverage, manually checked every field read in the @ts-nocheck recovered-transcript resolver against its real contracts, and completed same-model adversarial + performance review, OSS-precedent review, and start/end readiness audits with no remaining committed-code P0/P1/P2 findings.
  • Fixed the accidental @pnpm/exe lockfile metadata and the stale Windows perf-ratchet expectation exposed by CI. The exact final focused subset passed 73/73 serially.
  • Full Actions run 34030412073 passed for this exact head: all 8 test shards, changed E2E, Windows/Linux packaging, static analysis, typecheck, compatibility, IME, and verify (27 successful jobs; 2 intentionally skipped).

Visual/runtime evidence:

Residual validation gap: the packaged Windows artifact itself was not manually launched to exercise the post-launch re-probe, although the Windows package smoke job is green. The rapid-successive-message duplicate/drop observation remains unattributed and outside this routing-only PR's scope; this review did not expand into message-dispatch redesign.

Take main's Windows CreationTime infrastructure wholesale: main's addon now
self-reports supportedProcessDataFlags, so the async capability probe this
branch carried (and the status/gate plumbing it forced) is unnecessary.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

This merge leaves the unit suite red: the foreground snapshot flag test asserts a projection split the merge silently dropped.

Reviewed changes (delta against the prior Pullfrog review at a2fcf33)

  • Merged main — brought in #18986 (fix(windows): unblock structured native chat by exposing process creation time) and dropped this PR's own addon patch, build tooling, windows-process-tree-loader.ts, and the probeWindowsProcessStartTimeAvailability state machine. Creation-time capability is now delegated to main's supportedProcessDataFlags-backed isWindowsProcessStartTimeAvailable(), and getStatusAfterWindowsProcessStartTimeProbe is gone in favor of a synchronous windowsProcessStartTimeAvailable field on getStatus().
  • Lockfile stabilization — 1ef54a4e is lockfile-only.
  • Foreground snapshot flag test — bf957c7 re-aligned windows-foreground-process-inspection-cost.test.ts to assert the pane snapshot requests only CommandLine (flags 2), matching the pre-merge split where DETAILED_PROJECTION was CommandLine-only.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Main asks for CreationTime on both projections; this branch's hot-path
isolation went away with the async probe it served.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in this delta — the red foreground-snapshot test is fixed and green. Not an approval: the paired-web host-swap gap raised in the prior review is unchanged by this commit and remains open.

Reviewed changes (delta against the prior Pullfrog review at bd42eaa)

  • Restored main's pane-snapshot flag contract — windows-foreground-process-inspection-cost.test.ts now asserts the pane snapshot requests flags 6 (CreationTime | CommandLine), matching main's DETAILED_PROJECTION (IDENTITY_PROJECTION.flags | CommandLine), and renames the test to "never sets the Memory flag". The stale toBe(2) assertion is now toBe(6). Verified green locally (4/4 passing).

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Main centralised the launch gate in structured-native-chat-launch-route, where it
re-added the client-side codex+win32 refusal. Delete that blocker there instead,
so the renderer and orchestration both stop guessing; createSupport still answers.
Drops the now-unread platform input end to end.

Also dedupes two shadowed lastActivityAt keys that arrived from main in #19127 and
fail tsc; the later value already won, so behaviour is unchanged.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues in this delta — one minor cleanup observation in the nitpicks.

Reviewed changes (delta against the prior Pullfrog review at 88ca86a)

Commit 61dd2e4 merges main and deletes the client-side Codex-on-Windows refusal that main re-introduced when it centralised the launch gate, so the refusal now lives entirely on the executing host.

  • Moved the Codex Windows refusal onto the executing host — resolveStructuredNativeChatSupport drops the codex-on-windows blocker and the platform input; the renderer's resolveAgentLaunchRoute and orchestration's decideWorkerStartMode both stop guessing from the client platform. The host still fails closed at supportsCodexStructuredLocation / createCodexStructuredLaunchResolver (win32 without creation-time proof is refused) and at orchestration's resolveWorkerStartModeOnHost, which consults the host createSupport for the resolved worktree.
  • Dropped the now-unread platform input end to end — removed from the shared input type, the renderer router, the orchestration decision, and the workers.ts call site.
  • Reverted windows-descendant-exit-verification.ts and en-runtime-required.json to main's shape — their PR-local hunks were dropped in the merge and no longer appear in the PR diff.
  • De-duplicated two shadowed lastActivityAt keys in first-work-branch-rename.test.ts that arrived from main and failed tsc.

The paired-web host-swap gap raised in the prior review is unchanged by this commit and remains open.

ℹ️ Nitpicks

  • codex_on_windows is now dead in src/main/runtime/rpc/methods/orchestration-worker-start-mode.ts: the codex-on-windows blocker was its only producer (through BLOCKER_REASON), and this commit removed that mapping while leaving the WorkerStartModeReason member (line 40) and its DOWNGRADE_DETAIL entry (line 77) in place. The leftover detail string — "Codex has no structured session on Windows" — now states the opposite of what the PR ships. Remove the enum member and the detail entry.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Main's new launch-identity test doubles answered every RPC with one shape, so
Codex's now-required createSupport probe read as unsupported.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in this delta. The merge reconciliation is clean and preserves the host-side Windows gate for both providers. Not an approval: the paired-web host-swap gap and the dead codex_on_windows reason flagged in prior reviews remain open and unchanged.

Reviewed changes (delta against the prior Pullfrog review at 61dd2e4)

Commit 61ec13a merges main and keeps the executing-host createSupport probe for both Codex and Claude, reconciling this PR's fail-closed Windows gate with main's refactored acquisition/adoption code.

  • Merged main's structured-session refactor — acquireOwner (now imported from structured-agent-session-acquisition.ts) and importAdoptedTranscript/prepareAdoptedTranscript (from structured-agent-session-adopted-import.ts) are adopted; the PR's adapterSupportsCreateIfDeclared re-checks in performAttach and acquireNativeHandoffOwner survive the reconciliation, so the gate still fails closed before reserving/spawning and before unbinding the TUI owner.
  • Kept the host probe for both providers — launchStructuredAgentSession still calls agentSession.createSupport before create (via requireHostCreateSupport), and supportsCodexStructuredLocation still refuses win32 without creation-time proof.
  • Fixed the launch-identity test doubles — structured-agent-session-launch-resume-identity.test.ts now answers agentSession.createSupport with { supported: true } instead of falling through to the catch-all RPC shape, so the now-required probe no longer reads as unsupported and the suite's real intent-builder stays green.
  • Dropped the leftover platform input from the remaining renderer call sites (ai-vault-session-resume-in-chat-workspace.ts, folder-workspace-composer-submit.ts, full/quick-creation-execution.ts) and replaced the Codex Windows-refusal router test with an assertion that a stale platform argument no longer flips either provider off the structured route.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025
brennanb2025 merged commit a899f92 into main Sep 7, 2026
26 of 28 checks passed
Jinwoo-H added a commit that referenced this pull request Oct 14, 2026
…uctured chat

The Claude skip predates Claude structured chats (#18519, #18560); an id the host
has no record of is already dropped by the readable restorer.

Claude-Session: p2-headless
Jinwoo-H added a commit that referenced this pull request Oct 14, 2026
* fix(runtime): save a windowless host's chat tabs in its layout

Claude-Session: p2-headless

* fix(runtime): remove a chat's saved tab on the index's hidden notice, which every close reaches

Claude-Session: p2-headless

* fix(runtime): a chat whose record is gone loses its saved tab at startup

Claude-Session: p2-headless

* test: run the windowless chat-layout host test in the Node runtime project

Claude-Session: p2-headless

* fix(runtime): remove a chat's saved tab from whichever partition still holds it

Claude-Session: p2-headless

* refactor(runtime): list saved chat tabs across partitions in the layout module

Claude-Session: p2-headless

* refactor(runtime): read saved chat tabs straight from the store's partitions

Claude-Session: p2-headless

* fix(chat-tabs): save a windowless chat tab under its own tab id

Review pass: the saved tab reuses the id status and attention address, the close
checks for a window before scanning partitions, and the host tests seed readable
records with unreadable, other-host and no-index cases.

Claude-Session: p2-headless

* test(chat-tabs): a window opening a windowless-saved chat reuses its tab

Claude-Session: p2-headless

* test(chat-tabs): check the saved tab with the lookup a window reuses

The window's existing-tab lookup moves to the shared projection so the
windowless-layout test exercises it without importing the renderer.

Claude-Session: p2-headless

* test(chat-tabs): assert the reused tab's identity directly

Drops the shared lookup added for the test; two functions already carry that name.

Claude-Session: p2-headless

* fix(chat-tabs): leave an unstamped chat tab in an SSH partition to that host

Claude-Session: p2-headless

* fix(chat-tabs): count an unstamped chat tab as this host's only in the local partition

A desktop mirrors a remote server's chats into that server's runtime partition
without a host stamp; the startup sweep must not delete them.

Claude-Session: p2-headless

* refactor(chat-tabs): one chat tab writer, one startup match, local partition only

Chats run only on local hosts, so their saved tabs live in the local partition:
the cross-partition listing and its writer go. Open and close share one layout
load, the startup fill and sweep become one function beside the index seed, and
the tab filter is the existing savedSessionId.

Claude-Session: p2-headless

* fix(chat-tabs): restore and sweep saved Claude chat tabs like any structured chat

The Claude skip predates Claude structured chats (#18519, #18560); an id the host
has no record of is already dropped by the readable restorer.

Claude-Session: p2-headless
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant