Skip to content

feat(codex): run Windows Codex on the real ~/.codex - #24356

Merged
Jinwoo-H merged 32 commits into
mainfrom
sta-9109-windows-real-codex-home
Oct 3, 2026
Merged

Jinwoo-H merged 32 commits into
mainfrom
sta-9109-windows-real-codex-home

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​523 $\color{#cf222e}{\Huge{\mathbf{−}}}$​364 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​159
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​327 $\color{#cf222e}{\Huge{\mathbf{−}}}$​137 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​190

ELI5

On macOS and Linux, Orca runs Codex directly on the user's own ~/.codex folder. On Windows, Orca kept its own copy of that folder and rebuilt it on every new terminal.

This PR moves Windows onto the user's own ~/.codex too, the same switch macOS and Linux got in #9501. Orca doesn't copy its old folder over. The one exception: if you signed in to Codex inside Orca and ~/.codex has no sign-in, that sign-in is copied over so you aren't logged out.

What Changed

Before (Windows): Codex in an Orca terminal used %APPDATA%\orca\codex-runtime-home\home, Orca's copy of ~/.codex.

After (Windows): Codex in an Orca terminal uses ~/.codex, the same folder Codex uses outside Orca, as on macOS and Linux. Orca's status hooks are installed and trusted there through the existing real-home code.

Mechanism:

  1. Routing. The Windows-only check that kept Windows on Orca's copy (isShellStartupEnvProbeSupported) is removed. Windows now goes through the same isHostSystemDefaultRealHomeSelected check as macOS and Linux.

  2. Spotting a CODEX_HOME set in shell startup files. Windows was held back (fix(codex): keep shell-profile-only Windows CODEX_HOME on the managed lane #10221) because Orca couldn't tell when a user sets CODEX_HOME only in their PowerShell profile (Windows: shell-profile-only CODEX_HOME is undetectable — real ~/.codex gets hooks/trust while codex runs elsewhere #9788). Orca would then put its hooks into a ~/.codex that Codex never reads.

    • New src/main/pty/powershell-profile-env.ts reads PowerShell profiles as plain text:
      • It covers the all-users and current-user profiles of Windows PowerShell 5.1 and PowerShell 7.
      • It recognises $env:CODEX_HOME = …, Set-Item/New-Item env:CODEX_HOME … and [Environment]::SetEnvironmentVariable('CODEX_HOME', …), ignoring end-of-line comments and a trailing ;.
      • A line counts as an assignment by its left side alone. Its value is then read as cleared ($null or empty), a literal path (with $HOME/$env:USERPROFILE expanded), or something it can't evaluate, such as (Join-Path …). An unevaluable value counts as a custom home, so a wrong guess keeps that user on Orca's copy.
      • Within each PowerShell edition the last assignment wins, so a later profile that resets or clears CODEX_HOME cancels an earlier one.
      • It finds the Documents folder from the registry, so OneDrive-redirected Documents work, and reads UTF-16 profiles.
    • Git Bash login files are read through a new readBashStartupEnvVar.
    • If any of these leaves CODEX_HOME pointing somewhere else, that user stays on Orca's copy, which is today's behaviour.
  3. One small login copy (runtime-home-service-home-routing.ts). On Windows, when a terminal launch or the usage poll goes to ~/.codex, Orca copies its copy's auth.json into ~/.codex only when all of these hold:

    • ~/.codex has no auth.json.
    • Orca's copy has one, recorded as the system default's (never a managed account's, never unattributed).
    • Orca's copy was set up from an empty ~/.codex, so that sign-in can only have been made inside Orca.

    The write never overwrites and goes through the existing ~/.codex auth writer. Whether or not it lands, Orca then records its copy's sign-in as the new starting point, which ends the copy. A later logout in ~/.codex isn't undone, even when ~/.codex had its own sign-in at the time, and terminals still running on Orca's copy keep following ~/.codex ([Bug]: Orca's private CODEX_HOME causes a Codex auth-revocation war with the user's ~/.codex #5370).

  4. Shared-server warning (feat(terminal): warn when a typed Codex joins Codex's shared server (STA-9051) #24217) on Orca's copy. Windows tabs on Orca's copy no longer show the "sharing a server" banner, matching macOS and Linux.

    • The only tabs left on Orca's copy are terminals opened before the upgrade, and fallback launches (a custom CODEX_HOME, or while Orca's hooks are being approved).
    • feat(terminal): warn when a typed Codex joins Codex's shared server (STA-9051) #24217's special Turn off for Orca's copy is removed for parity with macOS and Linux, which already showed no banner for those tabs. For a terminal opened before the upgrade, a Turn off written into Orca's copy is overwritten from ~/.codex, so it wouldn't stick.
  5. Unchanged:

    • session backfill, legacy session resume, and index heal
    • the restart prompt for terminals still running on Orca's copy
    • Orca's copy itself, which stays on disk untouched
    • a custom CODEX_HOME, or a host where hook trust can't be granted, still uses Orca's copy

What isn't moved, and why

This matches #9501, which moved macOS and Linux without copying anything. Some users strongly dislike Orca editing their ~/.codex, and editing config.toml as text has gone wrong before (the duplicate project tables in #22592).

  • Folder trust: Orca's workspace pre-trust (on by default) trusts Orca-launched workspaces in ~/.codex. Codex asks once for any other folder.
  • Settings and hook approvals: these already sync back from Orca's copy to ~/.codex on every launch.
  • MCP servers that exist only in Orca's copy: these can only date from v1.4.214, about a week ago. MCP sign-ins aren't copied either.
  • "Always allow" command approvals: Codex asks again.
  • Prompt history and Codex's databases (memories, goals, thread state): left in Orca's copy. Past sessions are still reached through the existing session backfill.

If an import turns out to be needed, an opt-in version is kept on the sta-9109-windows-mirror-import branch.

Suggested release note: "Codex in Orca on Windows now uses your ~/.codex folder, like Codex outside Orca. Codex may ask you to trust a folder or approve a command again."

Why

Linked Issue

Linear: STA-9109.

Related to #24306 (partial fix, so this should not close it): resolves it for the system-default account. Managed accounts' homes still live under Orca's app data (%APPDATA%\orca\codex-accounts\<id>\home), and a custom CODEX_HOME stays on Orca's copy. Both still need a separate fix.

Also removes the Windows system-default part of #15741.

Visual Proof

N/A. There is no UI change; the evidence is the Windows run described under Testing.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Windows (real machine, isolated dev runtime, ORCA_BACKGROUND_LAUNCH=1, throwaway USERPROFILE/APPDATA):

  • This run was made with an earlier version of this PR. Its routing, profile and hook results still apply. Its results for copying settings, MCP servers and folder trust no longer apply, since that copy was removed.
  • Isolation note: Codex on Windows finds its default home from the OS profile folder, not USERPROFILE. The run therefore put a codex wrapper first on PATH that pins CODEX_HOME to the throwaway home, and took the real npm codex off PATH.
  • Upgrade: after signing in from an Orca terminal on main and restarting on this branch, a new terminal has no CODEX_HOME set, reports logged in, and runs on ~/.codex with Orca's hooks trusted (through the Codex app-server). codex resume <old id> opens the old session, and a prompt shows up as agent status working through the hooks.
  • PowerShell profile sets CODEX_HOME: the terminal stays on Orca's copy, and nothing is written to ~/.codex.
  • Codex outside Orca with Orca's hooks in ~/.codex: the SessionStart/UserPromptSubmit hooks complete, and no cmd.exe, conhost.exe, curl.exe or more.com processes are left behind.

Automated:

  • powershell-profile-env.test.ts covers:
    • both editions in load order, with the last assignment winning
    • a later profile resetting or clearing CODEX_HOME
    • Set-Item, New-Item and [Environment]::SetEnvironmentVariable lines, including a trailing comment, a trailing ; and a 'User' target
    • an unevaluable value such as (Join-Path …) counting as custom, and non-assignments (-eq, CODEX_HOME2 =, ==) being ignored
    • every test reads profiles from its own temp folder, never the machine's real all-users profiles
    • UTF-16 profiles and a registry-redirected Documents folder
  • Windows routing cases in runtime-home-windows-profile-ownership.test.ts: no CODEX_HOME means ~/.codex, while a PowerShell or Git Bash CODEX_HOME keeps Orca's copy.
  • runtime-home-mirror-login-copy.test.ts:
    • copies a sign-in made in Orca into an empty ~/.codex
    • leaves a ~/.codex with its own sign-in alone
    • doesn't undo a later logout, including when ~/.codex had its own sign-in at the first launch
    • stays one-shot when the snapshot after the copy fails
    • runs from the usage poll too
    • copies nothing when Orca's copy was set up from a signed-in ~/.codex, or when the sign-in is a managed account's or unattributed
    • does nothing on macOS or Linux
  • The runtime-home test harness reaches Orca's copy by setting a real custom CODEX_HOME, one of the routes that still lead there. It no longer mocks the routing check. It points the profile and registry lookups at the test's fake home, so tests never read the developer's own PowerShell profiles.
  • src/main/codex-accounts, src/main/codex, src/main/pty and src/main/ipc/pty on Windows: every failure also fails on the base commit, all in unchanged WSL, session-resume, SSH-lease and app-server suites. Two tests that fail on the base pass here, because they expect the system default on ~/.codex. The touched suites pass.
  • tsc on the node config, oxlint on the changed files, and the changed-code quality gate all pass.

Review

  • Known gap: the PowerShell reader only reads plain assignment lines. It misses a one-line if (...) { $env:CODEX_HOME = ... }, an assignment after ; on the same line, function codex { ... } wrappers, and dot-sourced files. Such a user is moved onto ~/.codex, as they would be on macOS without a recognised rc-file line.
  • Known gap: Git Bash rc files are read from USERPROFILE, not a custom $HOME. Left as a follow-up; it fails safe onto Orca's copy only if USERPROFILE's rc files set CODEX_HOME.
  • Not in scope: Windows cmd.exe panes have no startup file to read.
  • No daemon protocol bump: only the per-spawn environment changes; no CODEX_HOME/ORCA_CODEX_HOME is injected for the system default. The shell startup scripts already handle that.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

  • SSH/WSL: untouched. WSL Codex keeps its own distro-local home, and remote hosts own their own Codex home.
  • Performance: the profile read is cached for the life of the process. After its first decision, the sign-in copy costs one provenance read per real-home launch or usage poll on Windows.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 0/5

[High risk] Refactors how Windows Codex homes are routed and initialized.

The PR does not appear safe to merge while MCP credentials can cross accounts and removed command approvals can be restored.

Findings

  1. P1 Security MCP tokens can cross accounts ▶
  2. P1 Security Removed command approvals return ▶
  3. P1 Mirror MCP sign-ins are stranded ▶
  4. P2 Skill versions can mix ▶

Summary

The PR routes eligible Windows system-default Codex launches to the real ~/.codex and incrementally carries state from Orca’s retired mirror. Since the previous review, it also adds a carry step for rules, skills, plugins, and history, and changes MCP credential eligibility. The new carry can restore a removed command approval or mix files from different skill versions; the credential change can associate older MCP tokens with a different account.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  M[Retired Windows mirror] --> C[One-time carry]
  C --> R[Real ~/.codex]
  R --> O[Orca Codex]
  R --> X[Codex outside Orca]
Loading

Reviews (12) · Last reviewed commit: "fix(codex): carry the retired mirror bef..."

Comment thread src/main/pty/powershell-profile-env.ts Resolved

@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 blocking issues. Two rough edges in the retired-mirror carry worth a look, plus two small notes.

Reviewed changes

  • Windows routing parity — removes the win32 guard from isHostSystemDefaultRealHomeSelected, so the system-default lane now routes to the real ~/.codex on Windows like macOS/Linux.
  • PowerShell profile probe (powershell-profile-env.ts) — reads $env:CODEX_HOME = … as text from Windows PowerShell 5.1 and 7 $PSHOME + user profiles, resolving Documents through the registry's Personal known folder; Git Bash login files come from the existing POSIX reader.
  • Retired-mirror carry (retired-mirror-carry.ts + runtime-home-service-launch.ts) — one-time, additive migration of mirror-only project trust, MCP servers, MCP .credentials.json, and in-pane login into ~/.codex, marker-gated and re-armed on mirror-lane launches.
  • Hook-promotion return value — promoteCodexRuntimeHookApprovalsToSystem now returns a boolean so the carry can tell success from a swallowed failure.
  • Test harness seam rename — shellStartupEnvProbeSupported → realHomeRoutable, with new Windows routing, PowerShell profile, and carry specs.

ℹ️ Nitpicks

  • readShellStartupEnvVar requires the literal shell === 'bash' on win32, but shellStartupFiles already normalizes via posix.basename(shell).toLowerCase(). A Git Bash pane whose SHELL is /usr/bin/bash (the common value) is therefore not read for non-CODEX vars. The CODEX path is unaffected because readShellStartupCodexHome hardcodes 'bash'; consider matching the basename if other callers should see Git Bash profiles.

  • Confirming intent only: the PowerShell profile read is memoized for the process lifetime, so a profile edited while Orca is running is not seen until restart. The JSDoc documents this, and the POSIX cache behaves the same, so this is informational.

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

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: Advanced

Run ID: 542dc49a-72e2-43aa-8532-00009cee9697

📥 Commits

Reviewing files that changed from the base of the PR and between 50a23a1 and e6d3023.

📒 Files selected for processing (2)
  • src/main/codex-accounts/retired-mirror-carry.test.ts
  • src/main/codex-accounts/retired-mirror-carry.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/codex-accounts/retired-mirror-carry.test.ts
  • src/main/codex-accounts/retired-mirror-carry.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The changes add Windows PowerShell profile discovery for custom CODEX_HOME assignments and update system-default routing to use real-home routability instead of shell-startup probe support. They also add a Windows-only retired-mirror carry flow for eligible settings, hook approvals, and login state. Runtime-home tests and fixtures are updated to use the new routing control.

Priority: ⬆️ High

Merge Risk: 🟡 Moderate · up to e6d30

Windows users with a commented PowerShell CODEX_HOME assignment can still be routed to ~/.codex instead of retaining the managed copy. Fix this detection gap before merging. Inline project declarations are now preserved without introducing conflicting TOML tables.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 24 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed For #24306, the PR routes Windows system-default Codex sessions to the user’s ~/.codex instead of Orca’s protected managed CODEX_HOME. This removes the reported generated_images access path for …
Out of Scope Changes check ✅ Passed The profile readers, real-home routing changes, retired-mirror carry, hook approval handling, retry behavior, and related test updates support the Windows system-default home migration for #24306. The…
Title check ✅ Passed The title clearly summarizes the main change: routing Windows Codex to the user’s real ~/.codex home.
Description check ✅ Passed The description covers the required sections with detailed scope, rationale, linked issue identification, testing, and checklist status. It also explains the lack of visual proof and documents known g…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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: 5


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 581ea775-6b9c-4ce3-9f1d-29d33ce1b00d

📥 Commits

Reviewing files that changed from the base of the PR and between 14d4bb2 and 7179f69.

📒 Files selected for processing (24)
  • src/main/codex-accounts/retired-mirror-carry.test.ts
  • src/main/codex-accounts/retired-mirror-carry.ts
  • src/main/codex-accounts/runtime-home-managed-auth-recovery.test.ts
  • src/main/codex-accounts/runtime-home-per-account-homes.test.ts
  • src/main/codex-accounts/runtime-home-read-only-launch-resolution.test.ts
  • src/main/codex-accounts/runtime-home-real-home-lane-routing.test.ts
  • src/main/codex-accounts/runtime-home-resume-selection-gate.test.ts
  • src/main/codex-accounts/runtime-home-retained-auth-provenance.test.ts
  • src/main/codex-accounts/runtime-home-retired-mirror-carry.test.ts
  • src/main/codex-accounts/runtime-home-service-home-routing.ts
  • src/main/codex-accounts/runtime-home-service-launch.ts
  • src/main/codex-accounts/runtime-home-service-test-harness.ts
  • src/main/codex-accounts/runtime-home-session-migration-pass.test.ts
  • src/main/codex-accounts/runtime-home-settings-test-fixtures.ts
  • src/main/codex-accounts/runtime-home-system-default-snapshot.test.ts
  • src/main/codex-accounts/runtime-home-system-resource-materialization.test.ts
  • src/main/codex-accounts/runtime-home-windows-profile-ownership.test.ts
  • src/main/codex-accounts/sta-4422-transient-ownership-error.test.ts
  • src/main/codex/codex-real-home-path.ts
  • src/main/codex/hook-trust-promotion.ts
  • src/main/pty/powershell-profile-env.test.ts
  • src/main/pty/powershell-profile-env.ts
  • src/main/pty/shell-startup-env.test.ts
  • src/main/pty/shell-startup-env.ts
💤 Files with no reviewable changes (1)
  • src/main/pty/shell-startup-env.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Comment thread src/main/pty/powershell-profile-env.ts Resolved
Comment thread src/main/pty/powershell-profile-env.ts Resolved

@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

  • Mirror-only tables now move, not copy — carryMirrorOnlyConfig writes project-trust and MCP tables into ~/.codex and then strips them from the mirror config, so a removal the user makes in ~/.codex sticks and a later mirror pass takes the tables from there.
  • Credential writes are no-overwrite — copyIfAbsent and the in-pane login carry now publish through writeFileAtomicallyIfUnchanged(path, null, …), so a sign-in Codex wrote to ~/.codex meanwhile is never clobbered.
  • Login carry gated on proven system-default ownership — the carry only runs when provenance is committed and owned by system-default, closing the gap where missing provenance let a managed account's mirror bytes land in ~/.codex.
  • Carry made best-effort — the whole carry body is wrapped in try/catch, so a failing marker write can no longer turn launch prep into a failed terminal launch.
  • PowerShell profile probe reads more assignment forms — Set-Item/si and [Environment]::SetEnvironmentVariable(...), with tests covering both.

Both prior review threads were addressed and resolved.

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

@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: Advanced

Run ID: b4bb87c9-b7b5-4904-8ba2-d6465a4866a7

📥 Commits

Reviewing files that changed from the base of the PR and between 7179f69 and 8c63f9c.

📒 Files selected for processing (5)
  • src/main/codex-accounts/retired-mirror-carry.test.ts
  • src/main/codex-accounts/retired-mirror-carry.ts
  • src/main/codex-accounts/runtime-home-service-launch.ts
  • src/main/pty/powershell-profile-env.test.ts
  • src/main/pty/powershell-profile-env.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Comment thread src/main/pty/powershell-profile-env.ts Resolved

@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

One trust regression in the widened mirror move: a retained pane's project revocation can be silently replaced by ~/.codex's trust. Detail inline.

Reviewed changes

  • Generalized root-table ownership — readMcpServerTomlOwnership now delegates to readTomlRootTableOwnership, and the carry's new readTableOwnership recognizes project trust in header, dotted, and inline (projects.'X' = { … }) forms.
  • Widened mirror move — the carry now strips every mirror table the merged ~/.codex names, not just the tables carried in this pass, so an interrupted move stays retryable.
  • PowerShell profile reading — reads UTF-16LE profiles (Windows PowerShell 5.1's >/Out-File default) and treats the registry-named Documents folder as the load location, with %USERPROFILE%\Documents only as a fallback.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (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

  • Mirror prune now keys on a verbatim block match — carryMirrorOnlyConfig strips a mirror table only when the merged ~/.codex config holds that exact block (nextConfig.includes(block.trim())), so a mirror project marked untrusted while ~/.codex marks it trusted is left in place for the retained-pane merge to protect. This resolves the revocation-loss concern raised in the prior review.
  • Regression test added — keeps a mirror revocation ~/.codex disagrees with for retained panes asserts the mirror config is byte-identical after the carry.

@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: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 1cb7ca8b-4876-400a-8a88-2b47deac2440

📥 Commits

Reviewing files that changed from the base of the PR and between 2ba2242 and 50a23a1.

📒 Files selected for processing (2)
  • src/main/codex-accounts/retired-mirror-carry.test.ts
  • src/main/codex-accounts/retired-mirror-carry.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@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 prior revocation concern is addressed by the new section-equality prune; approval is withheld only because its review thread is still unresolved (resolving hit an API rate limit).

Reviewed changes

  • Mirror prune now matches whole sections, not substrings — carryMirrorOnlyConfig builds a Set of ~/.codex's TOML sections and prunes a mirror table only when an exact trimmed block matches, so a ~/.codex table that merely begins with the mirror block (e.g. an MCP server extended with an extra args key) no longer deletes the mirror's copy. Verbatim carried blocks still match, so the interrupted-move retry path is unchanged.
  • Regression test added — keeps a mirror MCP table that ~/.codex extends with more keys asserts the mirror config is byte-identical when ~/.codex's [mcp_servers.docs] carries an extra key; the old nextConfig.includes(...) check would have pruned it.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (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

  • Mirror prune now splits by table kind — carryMirrorOnlyConfig prunes project tables only on an exact trimmed-block match against the merged config, but prunes any [mcp_servers.*] section whenever ~/.codex names that server, regardless of content. This reverses the MCP half of the previous commit.
  • Rationale verified — the comment claims the mirror merge already prefers ~/.codex's MCP version. mergeSystemCodexConfigIntoRuntime drops a runtime MCP section whenever the system config names it or owns the root, and the legacy-shared path passes mirroredMcpServerRoot = true, so the whole MCP root is canonical in ~/.codex. Dropping the mirror copy is therefore inert for retained panes and fixes a server removed from ~/.codex resurrecting from the mirror.
  • Regression test flipped and strengthened — drops a mirror MCP table ~/.codex redefines, so removing it there sticks fails against the previous exact-block check; pnpm test src/main/codex-accounts/retired-mirror-carry.test.ts passes (7/7).

The prior pullfrog revocation concern remains protected by the project-side verbatim match, and all prior pullfrog threads are resolved.

Pullfrog  | View workflow run | Using DeepSeek Flash (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.

Important

The authored .credentials.json from Orca's retired Windows mirror can be published into ~/.codex without proving it belongs to the system-default account. Detail inline; a design question from the one-shot carry follows.

Reviewed changes

  • The carry is now additive and one-shot — carryRetiredMirrorConfig appends mirror-only project/MCP tables to ~/.codex and leaves the mirror byte-identical, and the re-arm was removed so the marker is permanent (commit ca415c0).
  • Credential carry split onto a dedicated service layer — carryRetiredMirrorCredentials moved into the new CodexRuntimeHomeMirrorRetirement class, still gated on committed system-default provenance, and now also writes back a token the mirror refreshed for that account.
  • Test harness uses the real CODEX_HOME route — the module-mock seam is replaced by process.env.CODEX_HOME, so mirror-lane tests exercise the production hasCustomCodexHomeOverrideForLaunch path.
  • PowerShell profile probe slimmed — reads only $env:/${env:} assignment forms, and Git Bash reading is extracted to readBashStartupEnvVar (commit e270a9c).

ℹ️ Later mirror writes are not carried once the marker is set

With the re-arm gone, the marker is permanent after the first successful carry, so any state a pane writes into the shared mirror afterward is never carried again. For MCP servers that is mostly covered by registration promotion, but project trust is not: promoteCodexRuntimeSettingsToSystem promotes scalar settings and registration/MCP tables only, and carryMirrorOnlyTables is the sole project path — and it is now unreachable after the first carry. Re-entering the mirror lane is live at runtime (the host can report its hook lane unusable), so a project trusted there would be lost to ~/.codex.

Technical details
# Post-carry mirror-lane project trust never reaches ~/.codex

## Affected sites
- `src/main/codex-accounts/runtime-home-service-mirror-retirement.ts:11-15` — `existsSync(markerPath)` early-returns forever once written.
- `src/main/codex-accounts/runtime-home-service-mirror-retirement.ts:22-24` — marker is written only when the config carry lands; nothing clears it.
- `src/main/codex/config-settings-promotion.ts:155-174` — promotion covers scalar keys and registration tables, not project trust.
- `src/main/codex-accounts/retired-mirror-carry.ts:97-102` — project tables are copied only by `carryMirrorOnlyTables`.

## Required outcome
Decide whether a project trusted inside a later mirror-lane pane must converge into `~/.codex`. If yes, either retain a (possibly cheaper) re-arm, or promote project trust on mirror passes so it does not depend on the one-shot carry.

## Open questions for the human
The PR description still says the carry "moves project-trust and MCP-server tables … and drops them from the copy" and that any later mirror-lane launch "re-arms the carry" — both are reversed by ca415c0. Is the description stale, or was the one-shot change meant to keep the re-arm?

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Comment thread src/main/pty/powershell-profile-env.ts Resolved

@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

The new gate that keeps a managed account's MCP credentials out of ~/.codex is permanent and content-blind, so it can also strand the system-default account's own MCP sign-in — the exact state this PR exists to carry. Detail inline.

Reviewed changes

  • MCP credentials are now gated on the managed-account claim — carryRetiredMirrorCredentials skips the .credentials.json copy when isLegacySharedMcpCredentialsClaimedByManagedAccount finds a migrated/per-account-present marker, with a new unit test for the marker reader and a service-level test for both outcomes.
  • Unrecorded settings baselines now carry mirror-only MCP servers — CodexSettingsBaseline gained mcpOwnershipUnrecorded (set when the stored baseline has no mcpServers key), and carryRetiredMirrorConfig nulls MCP ownership for those baselines so mirror-only MCP tables are appended instead of suppressed by mcpServerRoot === true.
  • Regression test added — reads $baseline as MCP ownership only when it records some covers both an unrecorded and a recorded baseline, and fails against the previous mcpServerRoot-only check.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (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 in this delta. Approval is withheld only because earlier Pullfrog threads on this PR remain open.

Reviewed changes

  • Carry made retryable per step — carryRetiredMirror now records which of settings/hooks/tables/credentials landed in retired-mirror-carry-v1.json, reruns only the steps still owed, and returns whether the mirror is fully retired.
  • Retained-pane config refresh gated on completion — reconcileLegacySharedHomeForRetainedPanes skips syncLegacySharedCodexConfigForRetainedPanes() while a step is still owed, so a failed carry's mirror-only config is not overwritten before its retry.
  • PowerShell probe is now last-assignment-wins — readPowerShellProfileEnvValues keeps only the final $env:CODEX_HOME assignment per edition, so a later reset or clear cancels an earlier custom value; Git Bash is still read separately via readBashStartupEnvVar.
  • .credentials.json handling widened — the carry now merges mirror MCP entries that ~/.codex lacks into an existing store, instead of only publishing when that store is absent.
  • Test harness sandboxed — setupRuntimeHomeTest pins USERPROFILE/SystemRoot/ProgramFiles and a throwing registry so the profile probe stays inside the fake home, and the new specs cover partial-step retry, a refused guarded write, and last-wins profiles. The harness's default retained-shared-pane record means the new config-refresh gate is actually exercised.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@OrcaWin
OrcaWin force-pushed the sta-9109-windows-real-codex-home branch from 88dccca to 0273f62 Compare October 1, 2026 23:05
@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Comments Outside Diff

These findings could not be posted inline.

  • P1 PATH installs cannot be fixed src/main/codex/codex-shared-server-fix.ts:23 ▶

    If Codex is installed through npm, Homebrew, or another PATH-managed installation rather than under CODEX_HOME/packages, this lookup finds no binary even when the pane is connected to a live shared server. Both actions in the new fix dialog then fail without running a command, so the user must disable sharing and stop the server manually.

@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. Approval is withheld only because earlier Pullfrog threads on this PR remain open.

Reviewed changes

  • Removed the mirror-only Turn off path — deleted disableCodexSharedServerAutoStartOnOrcaMirror and isCodexPaneOnOrcaMirrorHome, and the IPC handler now always calls the bare disableCodexSharedServerAutoStart, since the mirror is no longer a lane the shared-server banner targets on Windows.
  • resolveCodexPaneHome treats shared-home like the other unnamed lanes — it now returns null, so a mirror pane gets no shared-server warning or fix, matching macOS/Linux, where a write into the mirror would be overwritten from ~/.codex anyway.
  • Tests pared back to match — dropped the mirror-profile ownership and Turn-off promotion specs along with codex-shared-server-turn-off-promotion.test.ts, and added the shared-home → null routing case. The touched suites pass (62 tests across codex-shared-server-pane, codex-shared-server-fix, and the shared-server IPC test).

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (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 in this delta. The three commits cleanly address both open pullfrog threads; approval is withheld only because the remaining prior thread (the deliberate, content-blind managed-account MCP marker) is still open.

Reviewed changes

  • PowerShell probe reads Set-Item and .NET assignment forms — readPowerShellProfileEnvValues now also matches Set-Item [-Path] env:CODEX_HOME [-Value] … and [Environment]::SetEnvironmentVariable('CODEX_HOME', value[, target]), so a profile that sets CODEX_HOME through either form no longer silently routes that user onto ~/.codex (the #9788 failure). End-of-line comments are stripped before matching, and the last assignment per edition still wins.
  • MCP credentials copy all-or-nothing, and only to the same account — carryRetiredMirrorCredentials replaced the server-by-server mergeMissingCredentials with copyFileIfAbsent, so an existing ~/.codex/.credentials.json in any form is left untouched, and added a sameAccount gate that withholds the copy unless ~/.codex is logged out or still on the mirror's seeded identity. Regression tests cover the another-account and same-account outcomes.
  • Unrecorded-baseline MCP ownership reverted to match promotion — removedFromSystem now reads the baseline's mcpServerRoot/mcpServers exactly as config-settings-promotion.ts does, and the temporary mcpOwnershipUnrecorded field was dropped from CodexSettingsBaseline. A baseline written before MCP ownership was recorded again reads as owning the whole MCP root, so mirror-only MCP servers are not re-appended.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (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 critical issues — two robustness notes on the new mirror-only home-file carry.

Reviewed changes

  • Carried mirror-only home files — new retired-mirror-home-files.ts appends ~/.codex's missing rule lines, merges pane-installed skills/plugins without overwriting, and copies history.jsonl only when ~/.codex has none; wired as a fifth files carry step.
  • Unreadable carry marker now counts as done — readCompletedCarrySteps treats an unparseable or incomplete marker as fully complete (with a warning) instead of rerunning landed steps, so a setting or table the user removed cannot come back.
  • MCP credentials follow the mirror's current account — sameAccount now compares ~/.codex against runtimeAuth ?? seededAuth, so a pane that re-logged in after seeding is carried, and one that switched away is not.
  • Usage poll carries the mirror first — prepareForRateLimitFetch now calls reconcileLegacySharedHomeForRetainedPanes(), so the rate-limit read of ~/.codex never runs against a staler token.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (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 critical issues — two minor suggestions inline.

Reviewed changes

  • Dropped the retired-mirror carry entirely — retired-mirror-carry.ts, retired-mirror-home-files.ts, runtime-home-service-mirror-retirement.ts and their tests are deleted; Windows now moves onto ~/.codex without importing Orca's copy, matching #9501 for macOS/Linux.
  • Replaced it with a one-shot login copy — copyMirrorLoginIntoEmptySystemHome() writes the mirror's auth.json into ~/.codex only when the mirror was seeded from an empty ~/.codex (provenance committed, owner: system-default, authJson: null), never overwriting, then arms the gate so a later logout is not undone.
  • Reverted the carry-only seams — config-toml-mcp-servers.ts drops the readTomlRootTableOwnership export (logic inlined, no external callers), and hook-trust-promotion.ts returns to void; callers already ignore the value.
  • Routing and retained-pane reconciliation — reconcileLegacySharedHomeForRetainedPanes returns to its plain form and no longer gates config sync on a carry; the rate-limit branch drops the carry it briefly gained.

The gate is sound: every non-test writer of {owner:'system-default', authJson:null} pairs it with removal or absence of the mirror auth, so the bytes it copies can only be a login made inside Orca, and writeFileAtomicallyIfUnchanged(path, null, …) cannot overwrite an existing ~/.codex/auth.json. No managed/WSL token can reach that mirror path.

ℹ️ Nitpicks

  • The PR title still ends with "and carry the retired mirror into it", but 5a0a110897 removes that carry. Update the title to match the body.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@OrcaWin OrcaWin changed the title feat(codex): run Windows Codex on the real ~/.codex, and carry the retired mirror into it feat(codex): run Windows Codex on the real ~/.codex Oct 2, 2026

@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 since the prior pullfrog review at 889dbd2 (two commits, b48dc90 + 83eaf2e, net 5 files). Both prior inline findings are addressed by this delta.

  • The login copy arms its one-shot before the snapshot — copyMirrorLoginIntoEmptySystemHome now calls persistSharedRuntimeAuthProvenance before captureSystemDefaultSnapshot, and persists even when the no-overwrite write is declined, so neither a failed snapshot write nor a declined copy can leave a later ~/.codex logout re-copyable. The snapshot is captured only when the copy lands, so snapshot and provenance stay consistent.
  • The copy runs from the usage poll too — the method moved from CodexRuntimeHomeLaunch onto CodexRuntimeHomeRouting, and prepareForRateLimitFetch's real-home branch now calls it before returning getSystemCodexHomePath(), so an upgraded Windows user whose only sign-in is in the mirror is no longer reported as signed out until the first Codex pane opens.
  • Tests for both — the mirror-login-copy spec gains cases for a later ~/.codex logout after ~/.codex had its own sign-in, a blocked snapshot write, and the usage-poll path. The poll test fails without the new call; the snapshot test fails against the previous persist-after-snapshot order.
  • Comment-only edits — codex-shared-server-pane.ts (why mirror panes get no shared-server banner) and a re-wrap of the powershell-profile-env.ts JSDoc.

Both prior pullfrog threads are resolved by the author and their fixes are present in this delta; all 36 review threads on the PR are resolved.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Orca Worker added 10 commits October 2, 2026 13:54
…on ~/.codex

Windows, where the system default still ran there, and wrapped Turn off in
launch mirror passes so promotion carried the change to ~/.codex. With
Windows on the real ~/.codex, the mirror is the same fallback lane and
retired pre-upgrade home it already was on macOS and Linux, where #24217
names no home for it. Treat it that way everywhere, which leaves the
mirror-wrapped Turn off unreachable; remove it and its tests.
…ll profiles

A profile form the probe misses fails open onto ~/.codex, which is the #9788
bug, so dropping these forms was unsafe. Recognise Set-Item env:CODEX_HOME and
[Environment]::SetEnvironmentVariable with any target, and strip end-of-line
comments before matching.
…y to the same account

The per-key merge brought back MCP sign-ins the user had removed from
~/.codex and treated an unreadable store as done. Copy .credentials.json
only when ~/.codex has none, and only when ~/.codex is still logged into the
account the mirror was seeded from (or not logged in), since MCP tokens carry
no account of their own.
…motion does

Older builds made the mirror's MCP servers match ~/.codex on every pass, so a
mirror-only server under a pre-ownership baseline would have been wiped there
anyway. Respecting the baseline's whole-root ownership avoids bringing back a
server the user removed and keeps the carry and promotion in agreement.
…vive a corrupt marker

- New "files" carry step: append approved-command rule lines a matching
  ~/.codex/rules/*.rules lacks, copy pane-installed skills and plugins file by
  file without overwriting (skipping links and Orca's own copies of
  ~/.codex), and copy history.jsonl only when ~/.codex has none.
- A carry marker that can't be parsed now counts as every step done, since
  rerunning landed steps would bring back what the user removed since.
- MCP credentials follow only into a ~/.codex logged into the account the
  mirror's panes use now, falling back to the seeded login only when the
  mirror has none.
The real-home usage poll used ~/.codex without running the carry, so it could
read a stale token before the carry copied the mirror's newer one. It now
enters the real-home lane through the same reconcile as launch and startup.
Adds service tests for the poll, the MCP account check, the retained-pane
login sync during an incomplete carry, and no carry for a managed account or
a custom CODEX_HOME.
… as in #9501

Orca no longer edits the user's ~/.codex config, rules, skills, history or MCP
credentials when Windows moves onto it. Settings and hook approvals already
promote back, workspace pre-trust re-trusts Orca-launched folders, and
mirror-only MCP servers can only date from v1.4.214. The carry is archived on
sta-9109-windows-mirror-import for a possible opt-in import.

Restores main's retained-pane reconcile and usage-poll paths, and the helper
and export changes made only for the carry.
…Windows

Windows ran the system default only on Orca's mirror, so a login made in an
Orca terminal while ~/.codex had none exists nowhere else. On a real-home
launch, copy the mirror's auth.json into ~/.codex only when ~/.codex has no
login and the mirror was seeded, as the system default's, from an empty
~/.codex. The guarded write never overwrites, and recording the copied login
as the new seed makes it one-shot, so a later logout is not undone.
… it from the usage poll

Record the mirror's login as the seed whether or not the copy lands. A
declined copy (~/.codex had its own login) used to leave the seed null, so a
later logout let the next launch pull Orca's stale login in, and every launch
retried a write into ~/.codex. The seed is now saved before the snapshot, so a
failed snapshot can't reopen it either. The usage poll runs the same copy, so
an Orca-only user isn't shown as signed out until their first terminal.
…-wrap the profile reader doc

The mirror lane still exists for a custom CODEX_HOME and the hook-approval
fallback; it gets no banner for parity with macOS and Linux, not because it
is unreachable.
@OrcaWin
OrcaWin force-pushed the sta-9109-windows-real-codex-home branch from 83eaf2e to e28e132 Compare October 2, 2026 21:02
Orca Worker added 4 commits October 2, 2026 17:31
…al profiles

Every test now points SystemRoot and ProgramFiles at its own temp root, so
the $PSHOME profiles under C:\Windows and C:\Program Files are never read.
…side

A line counted only when its value also parsed, so New-Item, a value in
parentheses and a trailing ';' were missed, and '$env:CODEX_HOME = $null;'
read as the literal '$null;'. Each statement is now matched by its left side
and its value classified: $null or empty clears, a literal or bare word is
that value, and anything else is UNEVALUABLE_PROFILE_VALUE, a custom home
that can never equal ~/.codex, so a wrong guess keeps the user on Orca's
copy. The comment stripper is shared with the POSIX rc-file probe.
… code

copyMirrorLoginIntoEmptySystemHome now reads Orca's copy with
readRuntimeAuthForProvenance and writes through writeSystemDefaultAuth,
which takes an optional expectedContents and returns whether it wrote. With
the option it is the same never-overwrite write; its existing caller is
unchanged.
The mirror-lane rollout test stays on the mirror because of a custom
CODEX_HOME, not because it is Windows; daemon_auto_start is promoted because
`codex features enable|disable` writes it, not for the removed Turn off path.

@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 since the prior pullfrog review (83eaf2e → e28e132, then 22911db + 44f3d5f + 22e593e + 1b72152; six files). All 36 review threads are resolved.

  • PowerShell probe matches assignments by their left side — 44f3d5f reworks readPowerShellProfileEnvValues so a line counts on its left side alone, catching New-Item, a parenthesized value and a trailing ; that the old value-first match missed. parsePowerShellValue then classifies the captured value.
  • Unparsable profile values read as a custom home — a value that can't be evaluated as text (a surviving $/backtick in a double-quoted value, or whitespace/quotes/operators in a bare value) becomes UNEVALUABLE_PROFILE_VALUE (<unevaluable>, never a real Windows path), so a wrong guess keeps the user on Orca's copy instead of failing open onto ~/.codex. $HOME/$env:USERPROFILE still expand; a cleared or $null value contributes nothing.
  • Login copy routed through the shared auth writer — 22e593e has copyMirrorLoginIntoEmptySystemHome read the mirror auth via readRuntimeAuthForProvenance and write through writeSystemDefaultAuth (which gained an optional expectedContents and returns whether it wrote), replacing the inline fs calls. Behavior is preserved: the same never-overwrite writeFileAtomicallyIfUnchanged(path, null, …) path is used, and the abstract signature in runtime-home-service-state.ts was updated in step.
  • Profile tests isolated from the developer's real profiles — 22911db pins SystemRoot/ProgramFiles to a per-test temp root, so the $PSHOME profiles under the machine-wide C:\Windows / C:\Program Files are never read by the suite.
  • Two stale comments corrected — 1b72152 fixes the mirror-lane rollout comment (custom CODEX_HOME, not Windows, keeps the mirror) and the PROMOTED_CODEX_TABLE_SETTING_KEYS comment (codex features enable|disable, not the removed Turn off path).

I re-ran powershell-profile-env, runtime-home-mirror-login-copy and runtime-home-windows-profile-ownership: 34 tests pass.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H merged commit bd6d7b9 into main Oct 3, 2026
43 checks passed
AmethystLiang added a commit that referenced this pull request Oct 5, 2026
…use (#24271)

* fix(notebook): cancel kernel starts when the notebook closes (#24858)

Co-authored-by: OrcaWin <[email protected]>

* fix(markdown): reduce Find memory for ordinary text (#24635)

* fix(markdown): avoid offset arrays for ASCII Find

* test(markdown): pin ASCII Find memory budget

---------

Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(clipboard): decode uploaded images without joining all chunks (#24653)

Co-authored-by: OrcaWin <[email protected]>

* fix(mobile): release file previews after their tabs close (#24655)

Co-authored-by: OrcaWin <[email protected]>

* fix(editor): expire saved-file snapshots while the editor is idle (#24657)

Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(ai-vault): bound transcript text before joining message blocks (#24659)

Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(terminal): release retired status sources from the agent type cache (#24669)

Co-authored-by: OrcaWin <[email protected]>

* fix(jira): expire cached attachment images while idle (#24678)

* fix(jira): expire cached attachment images while idle

* test(jira): preserve cache bounds and site expiry after clears

---------

Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(mobile): merge terminal backlogs without rescanning growing strings (#24680)

Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(terminal): release retired scrollback layouts from status routing (#24686)

Co-authored-by: OrcaWin <[email protected]>

* fix(files): release expired mobile path inventories while idle (#24694)

Co-authored-by: OrcaWin <[email protected]>

* fix(jira): discard detail replies after closing an issue (#24835)

Co-authored-by: OrcaWin <[email protected]>

* fix(browser): avoid a redundant copy of live screencast images (#24851)

Co-authored-by: OrcaWin <[email protected]>

* fix(terminal): release closed layouts while reveal frames are paused (#24721)

Co-authored-by: OrcaWin <[email protected]>

* fix(quick-open): release expired legacy file inventories while idle (#24805)

Co-authored-by: OrcaWin <[email protected]>

* fix(ssh): keep terminal buffers out of failed workspace sync status (#24833)

Co-authored-by: OrcaWin <[email protected]>

* fix(native-chat): the desktop declares structured chat support to paired Orca servers (#24204)

* fix(native-chat): a host admits structured sessions by client capability, not its own chat setting

A host's experimentalStructuredNativeChat decided whether any paired client could reach
agentSession.* at all, and whether session.tabs.* showed it structured tabs. That setting is the
host user's own launch preference: whether a new agent opens as a chat or a terminal is decided by
whoever launches it. Using it as admission control meant a client whose own preference was
"structured chat" was refused on a host whose preference was "terminal", and chats opened while
the setting was on were withheld from mobile once it was turned off.

The gate now asks one thing: did the client advertise agent-session.structured.v1 (in-process
callers negotiate nothing and are always admitted). Tab projection and restore follow the same
rule. With the setting no longer gating anything, the separate cleanup gate (close, cancel,
unsubscribe, release), which existed only so those kept working after the setting was switched
off, is identical to the main gate and is folded into it. The settings listener that republished
tabs when the setting changed is removed, since projection no longer depends on it.

The host setting still picks the default for launches that start on the host itself
(agent.launch from mobile, orchestration worker-start).

* fix(native-chat): the desktop declares structured chat support to paired hosts

The desktop renderer advertised agent-session.structured.v1 (and the Claude, turn-item and
background-task capabilities that go with it) to its own main process but not to a paired Orca
server. The server therefore refused every agentSession.* call from the desktop and stripped
structured chat tabs out of the tab list it published to it, so a structured chat running on a
paired server never appeared on the desktop, even though the renderer already mirrors a host's
agent-session tabs and drives each one against the server that owns its workspace.

The same renderer reads structured chats on either host, so the remote Electron list now carries
the same structured-session capabilities as the local one, and the capability test pins that
nothing is advertised only locally.

* fix(native-chat): negotiate client-chosen launch mode so released phones and old servers keep terminals

Hosts advertise agent-session.structured.client-launch-mode.v1: they admit
structured sessions by client capability alone. A remote client that does
not advertise it (phones released before agent.launch) asks createSupport
to pick the launch mode, so the host keeps answering that with its own
setting, exactly as before. Cleanup methods keep their own named gate so a
future admission condition cannot make close or cancel refusable.

* refactor(runtime): keep the Electron client capability list in its own module

protocol-version.ts is at its line budget; the list is what the desktop
advertises to paired hosts, not the host's own contract.

* fix(native-chat): the desktop declares it picks each launch mode itself

Paired hosts and the desktop's own main process then answer createSupport
by the workspace rather than by their own chat setting.

* chore(native-chat): justify the two type assertions this change's lines touch

* fix(native-chat): chats that already exist keep showing whatever the chat setting says

The structured chat setting decides only what new agents open as. With it
off, this machine's structured chats used to be hidden while the host,
which no longer reads the setting, still reported them to the workspace
activation gate, so a workspace holding only a chat opened empty. The
local chat mirror and its startup restore now run whatever the setting
says, the continue-after-restart offer follows the chats that exist, and
the setting's copy says it applies to new agents.

* test(native-chat): pin that a host advertises the client-chosen launch mode

* fix(native-chat): mirror this machine's chats only where it holds them

Round 1 ran the local chat mirror for everyone so existing chats show
whatever the setting says. That gave every desktop a permanent
session-tabs listener, which turns on the runtime's phone replication
paths, plus two full session-tab censuses at startup, and made the
browser client mirror its remote host a second time.

The runtime now says whether it holds structured chats: its structured
host is built only when saved chats were restored at startup or a client
created one here, and it announces the moment one is built. The mirror,
the startup restore and the continue-after-restart offer run only when
the setting launches chats or the host holds some, and never in the
browser client. A chat a paired client creates here with the setting off
still appears at once. The chat behaviour settings show wherever chats
exist, and the setting's copy says it picks what new agents open as. The
toggle-off teardown this made dead is removed.

* test(native-chat): record install listeners without a cast

* fix(native-chat): mirror this machine's chats only once it holds one, not once its host is built

Session history, resume preparation, terminal resume commands and replay-safe phone launches all
build the structured host for users who never had a chat, which turned on the chat mirror and the
structured-only settings rows until the next restart. The signal is now derived from the host's
records (or a records file still owed its import) and pushed when the first chat is restored or
created. A throwing listener no longer fails the install that fired it.

* feat(native-chat): createSupport reports the saved selection a new chat on this host starts with

A chat on a paired server starts with the server's saved model and options, which the desktop could
not read, so its picker showed a guess. createSupport's answer, which the desktop already waits for
before a paired launch, now also carries that seed as a new optional field (older clients ignore it).
Create and createSupport read it through one resolver so they cannot drift.

* refactor(protocol): move the Electron remote client capability list into its own module

Merging main left protocol-version.ts one line over the max-lines limit on this branch. The list of
capabilities the desktop advertises to a paired host moves, unchanged, into
electron-remote-runtime-client-capabilities.ts, the module the next PR in the stack already uses
for it; importers point there.

* test(cross-version): stub the launch seed resolver createSupport now reads

* test(protocol): pin the desktop capability divergence against what a paired server receives

Every paired transport sends the shared remote base plus the Electron list, so the
divergence test now compares that union with the renderer's local list instead of
the declared Electron list. A capability added only to the shared base can no
longer slip past it. The two base-only capabilities it surfaced are recorded:
skills.install-result.v2 has no local caller; the authoritative-inventory label is
read by the local tabs sync but dropped by main, and is marked unsettled.

The turn-item and both background-task-stop capabilities were already sent through
the shared base, so the Electron list no longer repeats them. The wire set is
unchanged; this PR's real change on the wire is structured.v1, the Claude
structured capability and the client launch-mode capability.

* fix(native-chat): the desktop tells its own host it picks each launch mode, so retrying an existing chat works with the setting off

* docs(native-chat): name the real exit for the released-phone createSupport rule

* test(cross-version): a released client still gets the host-setting createSupport answer; a launch-mode client gets supported plus the seed

* fix(ai-vault): release expired host results while idle (#24766)

Co-authored-by: OrcaWin <[email protected]>

* fix(orchestration): avoid loading task descriptions during promotion (#24781)

Co-authored-by: OrcaWin <[email protected]>

* feat(codex): run Windows Codex on the real ~/.codex (#24356)

Co-authored-by: Orca Worker <orca-worker@localhost>

* fix(mobile): release callbacks retained by canceled streams (#24625)

* fix(mobile): release callbacks retained by canceled streams

* test(mobile): cover delayed frames after stream cancellation

Preserve late-ready cleanup while rejecting canceled scrollback and terminal routing; cover unsent cancellation across browser, client events and session tabs.

* test(mobile): model unavailable queued stream transport

The encrypted sender rejects writes until connection setup completes. Keep existing session-tab unsubscribe attempts and assert canceled queued openers are never replayed.

---------

Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: Neil <[email protected]>
Co-authored-by: m4air <[email protected]>

* fix(mobile): reduce base64 allocations for encrypted text frames (#24665)

* fix(mobile): reduce base64 allocations for encrypted text frames

* Correct screencast encoder comment after byte-codec extraction

---------

Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: m4air <[email protected]>

* fix(cursor): resume exact conversation after startup status replay (#24670)

* fix(cursor): restore exact conversation after startup snapshot

* fix(terminal): preserve ready snapshot reattach and isolate bridge fixtures

* test(cursor): seed the real startup bridge after module resets

* test(terminal): settle startup snapshots in remote restore fixtures

Signed-off-by: Neil <[email protected]>

---------

Signed-off-by: Neil <[email protected]>

* fix(claude): inspect child tool IDs without rebuilding their output (#24707)

Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: m4air <[email protected]>

* fix(native-chat): remove the "still starting" notice that flashed on chat launch (#24564)

* fix(native-chat): remove the "still starting" notice that flashed on chat launch

Every structured chat passes through a starting phase, and the pane showed
"<agent> is still starting. Messages wait until it is ready; close this chat to
give up on it." for it. A 5 s grace period only narrowed the flash to starts
that finish just past it. A message sent while the agent starts already counts
as working, so the chat's working indicator and Stop cover that state; the
notice only repeated it.

Removes the notice, its copy in every locale, the delayed-status hook that
existed only for it, and the per-child key the chat read only to reset it.

* docs(agents): no pop-up notices for transient or internal states

Records the rule the removed startup notice broke, so agents building UI
show transient states through existing surfaces instead of new messages.

* docs(agents): allow the common delayed loading placeholder

The rule against delaying a flashing message should not forbid a quiet
skeleton or spinner that waits a moment before appearing.

* fix(native-chat): stop publishing which provider child is starting

hostExecutionChild existed only to re-key the removed starting notice's delay.
Older clients read it as optional, so omitting it only changes when their
notice appears after a still-starting child is replaced.

* docs(agents): narrow the status-notice rule's wording

Ban 'execution host' rather than ordinary host copy, scope 'confirming' to a
connection, and keep the no-delay rule where the common pattern delays.

* docs(agents): let a control's own busy state wait, per the style guide

The status-notice rule covers notices and status lines; a delayed in-place
label swap like "Saving…" stays as STYLEGUIDE.md describes.

* docs(agents): keep the status-message guideline out of the repo

* fix(native-chat): no loading flash on open, one report for a failed start, no "Not reported" caption (#24588)

* fix(native-chat): stop the loading flash, the doubled launch failure, and the "Not reported" caption

- A structured chat no longer paints "Start a chat" or the full-pane
  "Loading conversation..." text before its first read settles; the pane
  stays blank until the history (or its absence) is known. A chat this
  view just started keeps its empty state through publish.
- A failed chat start is said once, by the chat's own Retry line. The
  "Could not open <agent> chat" toast that fired beside it, and again on
  every failed Retry, is removed; the raw error still goes to the log.
- The Fast mode switch in the options menu no longer carries a
  "Not reported" / "Default" caption.

* fix(native-chat): show a quiet spinner if a chat's first read lasts

The blank pane stayed blank with no cue for as long as the first read
took, including a slow remote read or a pending resume. The pane now
holds a textless spinner (announced as "Loading chat") that a CSS
animation delay keeps invisible for the first 250 ms, so a quick read
still paints nothing. A cancelled launch no longer holds the pane in
that state; it shows what the chat shows when not launching.

* test(native-chat): a refused new-tab chat start reports in its chat, not a toast

The new-tab launch opens (or reuses) the chat tab before the start can
fail, so its Retry line is the one report. The guard tests now pin that
the chat tab exists and no toast fires, for both a refused start and one
whose outcome could not be confirmed.

* fix(native-chat): leave a failed resume's pane blank beside its Retry line

A resumed chat whose start failed or could not be confirmed kept the
loading spinner turning forever above "Chat could not be started.", though
nothing was reading its history. The spinner now shows only while a read or
the resuming launch is in flight.

Also log a chat tab that throws while opening during worktree creation, and
drop a comment that still described the removed launch-failure toast.

* fix(native-chat): plain wording for chat errors and status rows (#24594)

* fix(native-chat): plain wording for chat errors and status rows

Replaces Orca-internal words (host, journal, transcript, outbox, process,
unverifiable, "no contact", byte budgets) in native chat refusals, status
rows, the skills menu, subagent and background-task state labels and the
history-load error with plain language, and routes the two hard-coded
English composer errors through translate(). Copy only; no behaviour change.

* fix(native-chat): match chat copy to what happens and to the sidebar's words

- The held-message row says Orca keeps checking, which it does: the idle
  sweep retries the unproven stop and a landed retry sends what waited.
- An unsettled earlier message reads as unconfirmed, not undelivered.
- The skills-unavailable line names SSH chats, its only cause.
- Subagent and background-task rows say "no recent update", the sidebar's
  words for the same state, and "status unavailable" after a count; the
  row no longer repeats the state as a reason.

* test(native-chat): find the repair row by its own text, not the old wording

* fix(native-chat): word the history-repair and too-large rows in the reader's language

Both rows were finished English the host wrote into the chat, so nothing could
translate them. Each now names itself with a presentation, the way the
compaction row does, and the chat says it through translate(). The English text
stays on the row for clients that predate these presentations and for the phone.

* fix(native-chat): say composer send errors with the chat's notice sentences

The composer's two errors had their own wording file beside the sentence table
every other chat notice uses. The send outcome now carries notice parts, worded
by the same function as the rest. A refused redelivery says "Orca couldn't
confirm your message reached the agent. Check the chat, then send it again if
needed." (the same sentence the failed-send rework uses), and a message this
client couldn't store says "Couldn't save your message. Try again."

* fix(native-chat): drop the retry line, keep one name for a lost task, and say only true causes

- The history error pane no longer adds "Orca keeps trying to load this chat."
  under its title: the read still retries on its own, but the pane says only
  that the chat didn't load.
- A write refused as unsupported asks for an Orca update only when no reason
  came back, which means the host is older. A named reason (a location or agent
  that can't run there, no chat host, a client missing the capability) now reads
  "This isn't available in this chat.", since updating doesn't fix it.
- A task Orca lost track of is "no recent update" everywhere; after a count it
  reads "2 agents with no recent update" instead of a second name.
- The skills menu announces the same sentence it shows, including in SSH chats.
- The row for messages held behind a previous agent reads "{{agent}} from before
  may still be running. Your messages will send once it stops."

* fix(native-chat): a chat whose host can't run it says its history didn't load

A history read refused as unsupported with a named reason left the error pane
saying only "This isn't available in this chat.", which never said the chat
failed to load and named nothing the reader asked for. A read now says "This
chat's history couldn't be loaded."; other writes keep the shorter sentence.

* Avoid repeated pnpm archive downloads in cache producers (#24927)

* Let measured cache producers keep stores without downloading them

* Check that restore-only callers do not publish a producer path

* Enable the measured producer mode and record hosted comparisons

* fix(usage): include OpenCode cached input in totals

Normalize OpenCode cache reads and writes consistently across usage views, persistence and telemetry.

Continues #20187.

Co-authored-by: griffinmartin <[email protected]>

* fix(opencode): atomically install status plugin entrypoints

Retain complete status plugin files during replacement, symlinks and existing permissions, including legacy Windows directory permission recovery.

Fixes #24121. Continues #24131; permission-recovery review credited to pullfrog.

Co-authored-by: Ahmed Nagy <[email protected]>

* fix(opencode): select tmux status on the execution host

Track the attested tmux selected pane in the canonical status store and fence retired refreshes after asynchronous root resolution.

Fixes #10039.

* feat(accounts): link standalone GLM Coding Plans (#24618)

* feat(accounts): link standalone GLM Coding Plans

Adapt the reviewed GLM accounts contribution to current main, retain Antigravity behavior, guard late credential results, expose storage protection, and redact quota errors.

Co-authored-by: Luchong <[email protected]>

* fix(accounts): retain GLM credential results during quota refresh

* fix(accounts): make GLM credential editing desktop-only

* fix(accounts): mirror the host GLM site in paired clients

* fix(accounts): report unknown GLM host details and split web settings tests

Apply the independently reviewed Accounts correction from697284a without the v2 adapter commits. Preserve the saved-key store and serialized write behavior.

* fix(zcode): ship required GLM account translation entries

* chore: record GLM reconciliation hook validation

* chore: validate installed GLM commit hooks

* test: complete GLM account fixtures and web API inventory

---------

Co-authored-by: Luchong <[email protected]>

* fix(ci): prevent concurrent pnpm refresh during mobile typechecks (#24776)

* fix(ci): run mobile typechecks without concurrent dependency refresh

* test(ci): check effective Linux E2E package list

* test(ci): preserve the mobile production compiler barrier

---------

Co-authored-by: Orca Integration Recovery <[email protected]>

* test(terminal): restore the live fish fixture prerequisites (#24947)

A restored pane waits for the initial status replay before subscribing to
PTY output. This fixture never settled that replay, so fish printed its
mode-2031 arm before the renderer connected. Its PTY API also omitted the
reset-input listener required by the serializer, aborting attachment.

Settle and dispose the existing startup-snapshot registration and provide
the same reset-listener mock used by the other PTY tests. The real fish
child-stdin assertions and timeouts remain unchanged. No production change.

* fix(shortcuts): defer TUI editing chords in terminal-first mode (#24640)

Restack the original focused change onto current main, preserving every owned source and test blob and the merged CI contract and journal cleanup fixes.

Original-commit: f707cde14ab8cb2670b4076916cdfb7e28c79983
fix(shortcuts): defer TUI editing chords in terminal-first mode

Original-commit: 0c6348e49e0d968e0170961d294a018adceaa9f3
docs(shortcuts): describe deferred preview terminal chords

Original-commit: be62c1b6c6b305cb8091161c1ccdd943a6e1d470
Align worktree history shortcut metadata with terminal conflict policy

Restacked-from: be62c1b6c6b305cb8091161c1ccdd943a6e1d470
Restacked-onto: f7b1f9d8be14d12244957ee0b710a3482ec62383

* Register supervised Qoder China and Qwen Code (#24616)

* Add Qoder session history and search with real CLI coverage

* Allow the real Qoder marker file to end with a newline

* Keep Qoder tool output out of history previews and search

* Keep Qoder search pages readable by older clients

* Verify persisted Qoder history after a real generated and resumed task

* Negotiate Qoder filters before searching an older execution host

* Combine search client imports for the CI plugin gate

* Keep the relay search oracle aligned with legacy agent filtering

* Register supervised Qoder China and Qwen lifecycle integration

* Cover Qoder China mobile assets and mixed-host resume gates

* Verify Qoder provider tags against the older released wire parser

* Verify China and Qwen keep independent Windows hook scripts

* Verify Qoder registrations against the installed older Windows release

* test(qoder): align search capability contracts and pin old-host fencing

* fix(qoder): rank exact picker identities and command aliases first

* test(qoder): preserve the regional CLI shared icon expectation

Keep the full bundled-asset and no-remote-image checks, with an explicit
shared-logo basename for Qoder China. The map also works with older
catalog type unions.

* fix(qoder): align China catalog entry with fallback order

---------

Co-authored-by: Orca Integration Recovery <[email protected]>

* Use the measured pnpm lookup policy automatically in hosted root CI (#24951)

* Select lookup automatically for the measured hosted root-install profile

* Record hosted automatic-mode cold cache publication proof

* Continue Antigravity IDE and 2.0 history in new CLI conversations (#24692)

* feat(antigravity): bridge IDE history into new CLI conversations

* fix(antigravity): preserve fresh-launch model and environment for IDE references

* fix(antigravity): forward IDE history opt-in through desktop IPC

* fix(antigravity): rebuild remote IDE reference startup on its host

* fix(antigravity): register IDE continuation action labels

* fix(antigravity): confine IDE references and bound metadata reads

* fix(antigravity): localize IDE continuation badges

* Preserve scanner service cache assertions and refresh Antigravity opening metadata

* Preserve Antigravity opening joins and target folder runtime authority

* fix(opencode): retry timed-out SSH plugin updates (#24666)

Preserve bounded retry behavior and the current-main status-envelope fields.

Original-PR: #24124
Reviewed-source: 103144f9c5029f9217f64970271a5b7f69d3f823

Co-authored-by: Justas Brazauskas <[email protected]>

* fix(opencode): keep Go credentials private and resolve backend keys (#24615)

Preserve the complete credential storage, migration, IPC, Settings and rate-limit refresh change alongside standalone GLM plans, current-main database diagnostics and the reviewed unknown-backend environment correction. Keep native discovery cancellation third and selected environment fourth.

Original-topic-commit: 7903f1cddbc08fe1179f8bd964fff3dcb0e5d020
Original-topic-commit: 588117b5cf1dd57e2310c80068e3ddcc9f9044ec
Original-topic-commit: dedd4f8c862a961393977dc3c2547f049391b509
Original-topic-commit: 6645dae104ee5271139fcc0e9564d9223b74835d
Original-topic-commit: a25b80c02c1af7830b0e6a65e72d965b3ad98276
Restacked-from: a25b80c02c1af7830b0e6a65e72d965b3ad98276
Restacked-onto: b032867021c7ef1436ca606559e9d786580a84dc

Co-authored-by: kespineira <[email protected]>
Co-authored-by: kevimux <[email protected]>
Reported-by: pullfrog
Reviewed-full-source: 849fe093073f4c1606bd65d79a0c725d955d0d1f
Native-helper-source: 80dbe23237db191c1e6280001c7e0563f3ca8846


Reviewed-full-current-source: 36acb57d44adb3d378c0289c8c15f7da0fda214c

* Skip store notifications when refreshed work items are unchanged (#24530)

An identical forced refresh previously returned an empty Zustand patch, creating a new root state and notifying every subscriber. It now returns the current state after renewing the existing freshness timestamp. Real row or metadata changes still publish once.

* Read project activity once while sorting the sidebar (#24549)

Reuse the existing pure recent rank once per actual entry tuple within each synchronous sort; discard the lookup after sorting.

* Skip impossible link and tag matches in docs search results (#24646)

* Skip impossible HTML matches when formatting docs search results

After the existing link-removal phase, skip the unchanged HTML regex only when the current string has no closing delimiter.

* Skip impossible link and tag matches in docs search results

Skip the five unchanged link regexes when their protected-code input lacks ]; skip the unchanged HTML regex when its post-link input lacks >.

* Decode complete transcript lines without copying their bytes (#24546)

Decode each single owned Buffer synchronously; preserve concatenation for multipart records and remove a redundant tail array copy.

* Clear unused speech worker timers after errors and exit (#24924)

Call the existing idle timer cleanup when private current-worker state is cleared; keep current-worker guards, transcript/error order, deliberate warmth and stop deadline unchanged.

* Reuse documentation search excerpts during result navigation (#24574)

Memoize the existing pure excerpt renderer by complete raw text for the current result array, retaining original rendering as a miss fallback.

* Append subagent handoffs without recopying their message list (#24672)

Append each message reference to its private call-local scope list; retain the final merge and existing ordering.

* Cancel plugin retry timers when their fetch is replaced (#24700)

Reuse the existing timer clear block immediately after the fetch generation advances; preserve live retries and all state publications.

* Avoid rebuilding visible file paths for single-row selection (#24743)

Skip the visible path array only for keyboard replacement selection; the existing replacement branch never reads that order.

* Reuse prepared reads while searching saved agent conversations (#24535)

Use schema-complete session columns to enable the existing bounded statement cache without caching result rows.

* Reuse discovered mobile chunks during static traversal (#24774)

Iterate the existing live visited Set in FIFO discovery order instead of maintaining a second shifted queue; both actual callers own untouched esbuild JSON metadata.

* Skip unused image-size calculations in mobile web browser requests (#24941)

Use the existing mobile density budget only for mobile view; pass the existing constant to the existing assembler for web/default mode, where that argument is discarded. No cache, policy, request or native path changes.

* Skip diff analysis after a result has been discarded (#24711)

Move the unchanged pure render-limit calculation after both existing generation and section-token rejection fences.

* Skip late browser grab toasts after their surface closes (#24727)

Reuse the existing mounted-owner ref at the toast presentation entry while preserving all admitted extraction/screenshot and clipboard completion.

* Classify native chat waiting messages once (#24771)

Use the existing native filter traversal to populate a fresh waiting array, keeping the original predicate, policy, projection and output ordering while classifying each actual private slot once.

* Skip discarded Kanban pruning for an empty selection (#24782)

Guard only the existing open pruning branch when both its private selected Set and nullable anchor are empty; retain all original pre-guard projections and nonempty/anchor-only/public-helper behavior.

* Index discovered test files once during shard selection validation (#24532)

Verified selection plans previously validated each selected filename with a scan of all discovered files. One per-call Set now handles membership checks. Exact source/discovery checks, nonempty selection, fallback to all tests, shard balancing and manifests remain intact.

* Clear the watchdog benchmark heartbeat when CPU sampling fails (#24802)

Move the existing initial CPU observation and histogram enable inside the existing try/finally so their failures clear the sampler's owned heartbeat, preserving successful operation order and original errors.

* Reuse the parsed notification when leasing a push delivery (#24645)

* Reuse the parsed notification when leasing a push delivery

Pass the notification already parsed for the dismissal check into the existing private delivery builder.

* Reuse the parsed notification when leasing a push delivery

Pass the notification already parsed for the dismissal check into the existing private delivery builder.

* Update README downloads badge

* Let retired-cache GC observations settle across the existing six-turn budget (#24967)

* Collect test-selection evidence when full unit tests fail (#24955)

* Collect advisory unit-selection evidence from failed full runs

* Trigger checks after retargeting the evidence fix to main

* Check each project repository once while filtering mobile cards (#24540)

Reuse exact raw source/slug matching decisions within one project filter call, preserving the matcher, membership, negative matches, output order and identity.

* Skip renderer callbacks after their request has ended (#24631)

Reuse the existing pending-request identity check before starting its deferred renderer callback.

* Decode single-piece saved-session tails without copying them (#24632)

Decode the existing owned Buffer directly when the EOF tail has one piece; preserve the existing concatenation for multiple pieces.

* Avoid irrelevant scroll-action searches in Mac snapshots (#24731)

Check the current pure action name before searching for vertical scroll actions in the same immutable array.

* Stop copying every retained browser page before attachment (#24553)

Find the first page/generation match directly in the existing insertion-ordered Map instead of copying all page references into an array.

* Reuse event byte sizes when relay watchers notify several clients (#24558)

Store the existing grouped numeric byte-size array on the already call-local watcher batch sizing object, for reuse by later chunking clients.

* Stop building unused import candidates in the test planner (#24611)

Replace the existing ordered extension map/find with a loop that forms each candidate only when its existing lookup is reached.

* docs(terminal): explain local macOS/Linux shell startup files

Document the actual login/interactive shell startup-file order and existing shell setup behavior.

Co-authored-by: brynnclaw <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(editor): recognize Ruby task and configuration files

Add Ruby task/configuration filenames to the existing generated language associations.

Co-authored-by: ggbdpq <[email protected]>
Co-authored-by: Neil <[email protected]>

* Speed up large Markdown Find and render oversized tables (#24948)

* Speed up large Markdown Find and render oversized tables

* Poll table preview geometry outside hidden renderers

* Preserve Markdown navigation through refresh and tab restoration

* Confirm Markdown restoration when refreshed content is ready

* Trace table refresh positions and update Unicode search reference

* Recognize queued measurement scrolls before restoring Markdown anchors

* Rebuild Markdown Find ranges after renderer components change

* fix(source-control): generate clean OpenCode messages locally and over SSH (#24613)

* fix(source-control): generate clean OpenCode answers on local and SSH hosts

Restack the original focused change onto current main, preserving every owned source and test blob and the merged CI contract and journal cleanup fixes.

Original-commit: 64bb15e3f20799a21f108c849b0bdff83c692712
fix(source-control): generate clean OpenCode answers on local and SSH hosts

Use configured models and JSON answer/error events, preserve run-first arguments, and handle the precise v2 variant rejection. Hydrate SSH execution-host PATH through the existing bounded login environment resolver before direct spawning.

Credits: andy-murr (PR #5197 SSH environment intent) and coelho-doti (PR #13065 argument-order intent).

Original-commit: 1b60ec5d11132a5fed0695faea5de782a228a8e5
fix(source-control): retry inline OpenCode model and variant options

Original-commit: 98fdecc7a33ef1571dbf2854f309e4bfa1ec4300
Preserve OpenCode named errors without a data message

Restacked-from: 98fdecc7a33ef1571dbf2854f309e4bfa1ec4300
Restacked-onto: f7b1f9d8be14d12244957ee0b710a3482ec62383

* fix(ci): prevent concurrent pnpm refresh during mobile typechecks (#24776)

* fix(ci): run mobile typechecks without concurrent dependency refresh

* test(ci): check effective Linux E2E package list

* test(ci): preserve the mobile production compiler barrier

---------

Co-authored-by: Orca Integration Recovery <[email protected]>

* test(terminal): restore the live fish fixture prerequisites (#24947)

A restored pane waits for the initial status replay before subscribing to
PTY output. This fixture never settled that replay, so fish printed its
mode-2031 arm before the renderer connected. Its PTY API also omitted the
reset-input listener required by the serializer, aborting attachment.

Settle and dispose the existing startup-snapshot registration and provide
the same reset-listener mock used by the other PTY tests. The real fish
child-stdin assertions and timeouts remain unchanged. No production change.

* fix(shortcuts): defer TUI editing chords in terminal-first mode (#24640)

Restack the original focused change onto current main, preserving every owned source and test blob and the merged CI contract and journal cleanup fixes.

Original-commit: f707cde14ab8cb2670b4076916cdfb7e28c79983
fix(shortcuts): defer TUI editing chords in terminal-first mode

Original-commit: 0c6348e49e0d968e0170961d294a018adceaa9f3
docs(shortcuts): describe deferred preview terminal chords

Original-commit: be62c1b6c6b305cb8091161c1ccdd943a6e1d470
Align worktree history shortcut metadata with terminal conflict policy

Restacked-from: be62c1b6c6b305cb8091161c1ccdd943a6e1d470
Restacked-onto: f7b1f9d8be14d12244957ee0b710a3482ec62383

* Register supervised Qoder China and Qwen Code (#24616)

* Add Qoder session history and search with real CLI coverage

* Allow the real Qoder marker file to end with a newline

* Keep Qoder tool output out of history previews and search

* Keep Qoder search pages readable by older clients

* Verify persisted Qoder history after a real generated and resumed task

* Negotiate Qoder filters before searching an older execution host

* Combine search client imports for the CI plugin gate

* Keep the relay search oracle aligned with legacy agent filtering

* Register supervised Qoder China and Qwen lifecycle integration

* Cover Qoder China mobile assets and mixed-host resume gates

* Verify Qoder provider tags against the older released wire parser

* Verify China and Qwen keep independent Windows hook scripts

* Verify Qoder registrations against the installed older Windows release

* test(qoder): align search capability contracts and pin old-host fencing

* fix(qoder): rank exact picker identities and command aliases first

* test(qoder): preserve the regional CLI shared icon expectation

Keep the full bundled-asset and no-remote-image checks, with an explicit
shared-logo basename for Qoder China. The map also works with older
catalog type unions.

* fix(qoder): align China catalog entry with fallback order

---------

Co-authored-by: Orca Integration Recovery <[email protected]>

* Use the measured pnpm lookup policy automatically in hosted root CI (#24951)

* Select lookup automatically for the measured hosted root-install profile

* Record hosted automatic-mode cold cache publication proof

* fix: bound remote generation setup and honor OpenCode option terminators

Count execution-host profile resolution inside the existing request deadline, cancel its waiter promptly, and pass only the remaining time to the child. Shared bounded profile probes keep their existing cache lifetime; the SSH transport margin is unchanged.

Read OpenCode output format from active final-argv options before -- so literal prompt arguments cannot select the JSON finalizer.

Fresh exact-source controls reproduce nine failures before; 139 related checks pass after, including primary/fallback delays, deadline boundaries, cancellation, parser metadata, and SSH lanes. Node typecheck and strict changed-file lint pass.

* Continue Antigravity IDE and 2.0 history in new CLI conversations (#24692)

* feat(antigravity): bridge IDE history into new CLI conversations

* fix(antigravity): preserve fresh-launch model and environment for IDE references

* fix(antigravity): forward IDE history opt-in through desktop IPC

* fix(antigravity): rebuild remote IDE reference startup on its host

* fix(antigravity): register IDE continuation action labels

* fix(antigravity): confine IDE references and bound metadata reads

* fix(antigravity): localize IDE continuation badges

* Preserve scanner service cache assertions and refresh Antigravity opening metadata

* Preserve Antigravity opening joins and target folder runtime authority

* fix(opencode): retry timed-out SSH plugin updates (#24666)

Preserve bounded retry behavior and the current-main status-envelope fields.

Original-PR: #24124
Reviewed-source: 103144f9c5029f9217f64970271a5b7f69d3f823

Co-authored-by: Justas Brazauskas <[email protected]>

* fix(opencode): keep Go credentials private and resolve backend keys (#24615)

Preserve the complete credential storage, migration, IPC, Settings and rate-limit refresh change alongside standalone GLM plans, current-main database diagnostics and the reviewed unknown-backend environment correction. Keep native discovery cancellation third and selected environment fourth.

Original-topic-commit: 7903f1cddbc08fe1179f8bd964fff3dcb0e5d020
Original-topic-commit: 588117b5cf1dd57e2310c80068e3ddcc9f9044ec
Original-topic-commit: dedd4f8c862a961393977dc3c2547f049391b509
Original-topic-commit: 6645dae104ee5271139fcc0e9564d9223b74835d
Original-topic-commit: a25b80c02c1af7830b0e6a65e72d965b3ad98276
Restacked-from: a25b80c02c1af7830b0e6a65e72d965b3ad98276
Restacked-onto: b032867021c7ef1436ca606559e9d786580a84dc

Co-authored-by: kespineira <[email protected]>
Co-authored-by: kevimux <[email protected]>
Reported-by: pullfrog
Reviewed-full-source: 849fe093073f4c1606bd65d79a0c725d955d0d1f
Native-helper-source: 80dbe23237db191c1e6280001c7e0563f3ca8846


Reviewed-full-current-source: 36acb57d44adb3d378c0289c8c15f7da0fda214c

* fix(opencode): enforce deadline through executable startup

Keep synchronous Windows PATH resolution and child startup within the existing request budget.

---------

Co-authored-by: Orca Integration Recovery <[email protected]>
Co-authored-by: Justas Brazauskas <[email protected]>

* fix(persistence): preserve projectGroupOrder on restart for flat folder-scan groups

Retain saved project ranks when the project remains in its folder-scan group.

Co-authored-by: lurunzi <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(runtime): reclaim temp files orphaned by interrupted mobile store writes

Reuse the existing stale temporary-file cleanup policy when each mobile store opens.

Co-authored-by: LDH1103 <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(terminal): show actionable copy for missing folder workspace paths

Show the existing folder-path failure with concrete recovery instructions.

Co-authored-by: Wayn_Liu <[email protected]>
Co-authored-by: Neil <[email protected]>

* docs: reference local orca.yaml and .worktreeinclude

Document the existing workspace configuration, include/copy rules and sharing behavior.

Co-authored-by: Neil <[email protected]>

* fix(orchestration): allow model selection for OMP workers

Pass an explicitly requested model through the existing OMP worker launch catalog.

Co-authored-by: Neil <[email protected]>

* fix(cli): preserve primitive success results in JSON output

Check for an object before inspecting screenshot fields so primitive success results remain printable.

Related: https://github.com/stablyai/orca/pull/14735

Co-authored-by: Neil <[email protected]>
Co-authored-by: VXNCXNX <[email protected]>

* Show loaded file changes before deleting a workspace

Expose up to ten already loaded changed paths without altering deletion counts, hydration or authorization.

Related: https://github.com/stablyai/orca/pull/22778

Co-authored-by: Neil <[email protected]>
Co-authored-by: Michiel de Gooijer <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>

* fix(keybindings): record and match Option+digit shortcuts on macOS

Use the physical digit key for explicitly assigned Mac Option+digit shortcuts while retaining modifier checks.

Co-authored-by: marcuslannister <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(editor): don't throw closing a stale active file

Recover stale active-file selection within the owning workspace before choosing a surviving editor.

Related: https://github.com/stablyai/orca/pull/24715

Co-authored-by: m4air <[email protected]>
Co-authored-by: Neil <[email protected]>

* Fix Project Settings targeting for multiple local checkouts

Carry the selected checkout identity into the existing project Settings action.

Co-authored-by: fsmeier <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: Neil <[email protected]>

* feat(documents): open CSV and TSV files from the OS

Extend existing OS document associations and delivery to CSV/TSV, preserving restoration and authorization.

Co-authored-by: Neil <[email protected]>

* feat(cli): link GitHub and GitLab items on worktree create and set

Expose and validate the existing workspace link fields, preserving omitted values and provider identity checks.

Related: https://github.com/stablyai/orca/pull/22609

Co-authored-by: marco song <[email protected]>
Co-authored-by: SongMarco <[email protected]>
Co-authored-by: Luca Critelli <[email protected]>
Co-authored-by: Neil <[email protected]>

* feat(sidebar): include folder workspaces in keyboard navigation

Use the rendered sidebar row order and host identity when cycling through folder and Git workspaces.

Related: https://github.com/stablyai/orca/pull/10555

Co-authored-by: Neil <[email protected]>
Co-authored-by: JeongUk Park <[email protected]>

* fix(build): turn off MSBuild file tracking for Windows native rebuilds

Default Windows native rebuilds to TrackFileAccess=false while preserving explicit caller preferences.

Co-authored-by: B1nh M1nh <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: Neil <[email protected]>

* Fix Ctrl+M in Linux and Windows terminals

Keep the Minimize menu item but disable its accelerator registration on Linux and Windows.

Co-authored-by: Zhichang Yu <[email protected]>
Co-authored-by: Neil <[email protected]>
Co-authored-by: Ahmed Nagy <[email protected]>

Related contribution: https://github.com/stablyai/orca/pull/24143

* fix(startup): read a nushell login PATH from $env.PATH

Use Nushell login command syntax and preserve the actual login PATH value.

Related: https://github.com/stablyai/orca/pull/22677

Co-authored-by: Kh05ifr4nD <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(cursor): run local hooks through sh for non-POSIX login shells

Keep POSIX hook syntax inside one quoted sh command so the login shell can invoke it safely.

Related: https://github.com/stablyai/orca/pull/22663

Co-authored-by: Kh05ifr4nD <[email protected]>
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Neil <[email protected]>

* Fix word wrap for both panes in side-by-side diffs

Forward wrapping to both diff panes through the existing editor option path and clean up listeners.

Co-authored-by: Wooseong Kim <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(monaco): highlight Svelte block closers inside markup

Return Svelte block closers to the existing markup tokenizer state.

Co-authored-by: Wooseong Kim <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Neil <[email protected]>

* fix(repos): keep active clone dialog open on outside clicks

Ignore accidental outside dismissal only while cloning; Escape, Close and Back still cancel.

Related: https://github.com/stablyai/orca/pull/24581, https://github.com/stablyai/orca/pull/23430

Co-authored-by: Neil <[email protected]>
Co-authored-by: Nawapat Buakoet <[email protected]>

* fix(editor): keep chat visible after closing Markdown tabs

Count remaining unified chat tabs before clearing workspace selection during editor close.

Related: https://github.com/stablyai/orca/pull/24273, https://github.com/stablyai/orca/pull/23760

Co-authored-by: Neil <[email protected]>
Co-authored-by: Wooseong Kim <[email protected]>
Co-authored-by: Cursor <[email protected]>

* Honor typed starting numbers in chat ordered lists

Forward the existing parsed ordered-list start attribute to both chat Markdown renderers.

Related: https://github.com/stablyai/orca/pull/19765

Co-authored-by: Neil <[email protected]>
Co-authored-by: Frederic Barthelemy <[email protected]>

* Normalize base source once while checking changed-code diagnostics (#24557)

Reuse the exact existing moved-code matching algorithm with run-local lazy normalization of immutable base source blocks across diagnostics.

* Support real OpenCode sessions in native Chat (#24647)

* Use bounded OpenCode context for vault session continuation

OpenCode database and synthetic row paths are not text transcripts. Use the
vault preview or captured pane context, preserving actual transcript paths
containing a hash and supporting both OpenCode lanes and Windows paths.

Adapted the intent of #11859 and extended it to actual installed v2 vault rows.

Co-authored-by: mrcha033 <[email protected]>

* Read real OpenCode sessions in terminal-backed native Chat

Reuse the bounded AI Vault SQLite worker for v1 and v2 session pages and live updates. Keep terminal input as the real execution path and pace OpenCode Stop through its two-Escape interrupt.

Co-authored-by: xodmd45-ctrl <[email protected]>

* fix(opencode): publish approval cards for permission requests

* Send OpenCode native approval through its Enter selector

* Resolve mobile Chat readability for folder workspaces

* Bound OpenCode part batches and preserve v2 image attachments

* Prefer live migrated OpenCode sessions over legacy copies

* Consolidate mobile Chat eligibility test imports

* Consolidate OpenCode SQLite protocol type imports

* Update native chat settings contract for both OpenCode agents

* fix(native-chat): reconcile bounded OpenCode transcript reads

* fix(native-chat): dispatch OpenCode questions safely

* fix(native-chat): keep native discovery and transcript windows current

* feat(accounts): link standalone GLM Coding Plans (#24618)

* feat(accounts): link standalone GLM Coding Plans

Adapt the reviewed GLM accounts contribution to current main, retain Antigravity behavior, guard late credential results, expose storage protection, and redact quota errors.

Co-authored-by: Luchong <[email protected]>

* fix(accounts): retain GLM credential results during quota refresh

* fix(accounts): make GLM credential editing desktop-only

* fix(accounts): mirror the host GLM site in paired clients

* fix(accounts): report unknown GLM host details and split web settings tests

Apply the independently reviewed Accounts correction from697284a without the v2 adapter commits. Preserve the saved-key store and serialized write behavior.

* fix(zcode): ship required GLM account translation entries

* chore: record GLM reconciliation hook validation

* chore: validate installed GLM commit hooks

* test: complete GLM account fixtures and web API inventory

---------

Co-authored-by: Luchong <[email protected]>

* fix(native-chat): route transcript requests through shared SQLite worker

* fix(ci): prevent concurrent pnpm refresh during mobile typechecks (#24776)

* fix(ci): run mobile typechecks without concurrent dependency refresh

* test(ci): check effective Linux E2E package list

* test(ci): preserve the mobile production compiler barrier

---------

Co-authored-by: Orca Integration Recovery <[email protected]>

* test(terminal): restore the live fish fixture prerequisites (#24947)

A restored pane waits for the initial status replay before subscribing to
PTY output. This fixture never settled that replay, so fish printed its
mode-2031 arm before the renderer connected. Its PTY API also omitted the
reset-input listener required by the serializer, aborting attachment.

Settle and dispose the existing startup-snapshot registration and provide
the same reset-listener mock used by the other PTY tests. The real fish
child-stdin assertions and timeouts remain unchanged. No production change.

* fix(shortcuts): defer TUI editing chords in terminal-first mode (#24640)

Restack the original focused change onto current main, preserving every owned source and test blob and the merged CI contract and journal cleanup fixes.

Original-commit: f707cde14ab8cb2670b4076916cdfb7e28c79983
fix(shortcuts): defer TUI editing chords in terminal-first mode

Original-commit: 0c6348e49e0d968e0170961d294a018adceaa9f3
docs(shortcuts): describe deferred preview terminal chords

Original-commit: be62c1b6c6b305cb8091161c1ccdd943a6e1d470
Align worktree history shortcut metadata with terminal conflict policy

Restacked-from: be62c1b6c6b305cb8091161c1ccdd943a6e1d470
Restacked-onto: f7b1f9d8be14d12244957ee0b710a3482ec62383

* Register supervised Qoder China and Qwen Code (#24616)

* Add Qoder session history and search with real CLI coverage

* Allow the real Qoder marker file to end with a newline

* Keep Qoder tool output out of history previews and search

* Keep Qoder search pages readable by older clients

* Verify persisted Qoder history after a real generated and resumed task

* Negotiate Qoder filters before searching an older execution host

* Combine search client imports for the CI plugin gate

* Keep the relay search oracle aligned with legacy agent filtering

* Register supervised Qoder China and Qwen lifecycle integration

* Cover Qoder China mobile assets and mixed-host resume gates

* Verify Qoder provider tags against the older released wire parser

* Verify China and Qwen keep independent Windows hook scripts

* Verify Qoder registrations against the installed older Windows release

* test(qoder): align search capability contracts and pin old-host fencing

* fix(qoder): rank exact picker identities and command aliases first

* test(qoder): preserve the regional CLI shared icon expectation

Keep the full bundled-asset and no-remote-image checks, with an explicit
shared-logo basename for Qoder China. The map also works with older
catalog type unions.

* fix(qoder): align China catalog entry with fallback order

---------

Co-authored-by: Orca Integration Recovery <[email protected]>

* Use the measured pnpm lookup policy automatically in hosted root CI (#24951)

* Select lookup automatically for the measured hosted root-install profile

* Record hosted automatic-mode cold cache publication proof

* fix(native-chat): keep OpenCode history usable at read limits

Continue past failed database probes while preserving discovery cancellation.
Verify rows displaced by a capped tail before deciding whether to replace history.
Represent oversized v1/v2 rows with the existing omission text and stable cursors.

* Continue Antigravity IDE and 2.0 history in new CLI conversations (#24692)

* feat(antigravity): bridge IDE history into new CLI conversations

* fix(antigravity): preserve fresh-launch model and environment for IDE references

* fix(antigravity): forward IDE history opt-in through desktop IPC

* fix(antigravity): rebuild remote IDE reference startup on its host

* fix(antigravity): register IDE continuation action labels

* fix(antigravity): confine IDE references and bound metadata reads

* fix(antigravity): localize IDE continuation badges

* Preserve scanner service cache assertions and refresh Antigravity opening metadata

* Preserve Antigravity opening joins and target folder runtime authority

* fix(opencode): retry timed-out SSH plugin updates (#24666)

Preserve bounded retry behavior and the current-main status-envelope fields.

Original-PR: #24124
Reviewed-source: 103144f9c5029f9217f64970271a5b7f69d3f823

Co-authored-by: Justas Brazauskas <[email protected]>

* fix(opencode): keep Go credentials private and resolve backend keys (#24615)

Preserve the complete credential storage, migration, IPC, Settings and rate-limit refresh change alongside standalone GLM plans, current-main database diagnostics and the reviewed unknown-backend environment correction. Keep native discovery cancellation third and selected environment fourth.

Original-topic-commit: 7903f1cddbc08fe1179f8bd964fff3dcb0e5d020
Original-topic-commit: 588117b5cf1dd57e2310c80068e3ddcc9f9044ec
Original-topic-commit: dedd4f8c862a961393977dc3c2547f049391b509
Original-topic-commit: 6645dae104ee5271139fcc0e9564d9223b74835d
Original-topic-commit: a25b80c02c1af7830b0e6a65e72d965b3ad98276
Restacked-from: a25b80c02c1af7830b0e6a65e72d965b3ad98276
Restacked-onto: b032867021c7ef1436ca606559e9d786580a84dc

Co-authored-by: kespineira <[email protected]>
Co-authored-by: kevimux <[email protected]>
Reported-by: pullfrog
Reviewed-full-source: 849fe093073f4c1606bd65d79a0c725d955d0d1f
Native-helper-source: 80dbe23237db191c1e6280001c7e0563f3ca8846


Reviewed-full-current-source: 36acb57d44adb3d378c0289c8c15f7da0fda214c

---------

Co-authored-by: mrcha033 <[email protected]>
Co-authored-by: xodmd45-ctrl <[email protected]>
Co-authored-by: Luchong <[email protected]>
Co-authored-by: Orca Integration Recovery <[email protected]>
Co-authored-by: Justas Brazauskas <[email protected]>

* Drain removal fixture jobs before resetting and deleting their records (#24977)

* Reuse measured Electron preparation for current Terminal Perf refs (#24968)

* feat(jcode): add Jcode as a supported TUI agent with managed hooks

Ports PR #10521 onto current main: agent catalog, managed hook service,
agent-status listener, session resume, AI Vault parser, per-pane daemon
isolation, and Source Control AI support.

Co-authored-by: Neil <[email protected]>

* feat(jcode): evidence-backed status pipeline (turn_start, live pre_tool, questions)

Co-authored-by: czzczz <[email protected]>

* fix(jcode): register vault fixture, dynamic model discovery, script refresher

Co-authored-by: czzczz <[email protected]>

* fix(jcode): keep finished-turn detail so completion notifications fire

Co-authored-by: czzczz <[email protected]>

* fix(jcode): show the prompt in agent rows instead of jcode's repainting title

Co-authored-by: czzczz <[email protected]>

* fix(jcode): pre-warm the per-pane daemon so a cold runtime dir cannot time out

Co-authored-by: czzczz <[email protected]>

* fix(jcode): stop the OSC color skip from crashing every pane connect

Co-authored-by: czzczz <[email protected]>

* refactor(jcode): fold three reverse-scan copies into one, reuse the shared hook POST

The jcode journal reader, the Claude transcript reader and the Command Code
transcript reader each carried their own copy of the same reverse chunked line
scan; they now share one tested helper. jcode's managed hook script drops its
hand-rolled curl for buildPosixAgentHookPostCommand, which also gains it the
raw-JSON transport and the --noproxy guard the bespoke copy was missing.

Co-authored-by: czzczz <[email protected]>

* fix(jcode): narrow dynamic reads with predicates, pin the Windows hook shape

CI's anti-slop audit rejects Reflect.get: parse dynamic input into a named type
instead. Adds Windows script-shape tests too, since Windows is the platform this
change could not be exercised on directly.

Co-authored-by: czzczz <[email protected]>

* test(jcode): measure the gate against the synchronous path, not the clock

The absolute 1s bound was the flake CI shard 3/8 hit: it is tight enough to catch
a synchronous gate on an idle laptop and too tight on a loaded runner. Measuring
the same POST both ways on the same machine makes the claim a ratio, which is what
the test is actually about. Mutation-checked: a synchronous gate reads 6120ms
against a 1517ms observer.

Co-authored-by: czzczz <[email protected]>

* test(jcode): drop the wall-clock gate assertion

The bound was machine-speed sensitive and flaked on CI shard 3/8 at 1525ms. The
structural assertions (detached gate branch, foreground observer branch) and the
no-hang stdin drain cover the same contract without a timer.

Co-authored-by: czzczz <[email protected]>

* fix(jcode): address CodeRabbit review on #22539

- Windows posted no payload at all: the shared builder reads `payload@-` from
  stdin, which the gate has already drained and observer hooks never receive, so
  every Windows event was dropped. Write the env var to a temp file and pipe it.
- The daemon pre-warm never fired for daemon-host spawns, which is the default
  local path; it now runs there too, and from the final env so the daemon gets the
  hook port and token.
- A failed runtime-dir mkdir took down every local terminal, jcode or not.
- removeJcodeManagedHooks matched the raw line, so a user hook whose comment
  mentioned the managed script was deleted; matching on Windows never worked.
- A managed entry left by a copied home or a platform switch is now repointed
  instead of being reported as user-owned forever.
- The OSC colour skip only checked launchAgent, so a command- or telemetry-named
  jcode pane still leaked the reply into its composer.
- `['hooks']` and a commented scalar are recognised, instead of appending a
  second [hooks] table that makes jcode reject the whole config.
- A failed tool's error is marked as tool output rather than agent prose.
- The vault keeps a session's stored name, counts its tokens, and skips
  background_task and [Scheduled task] turns.

Co-authored-by: czzczz <[email protected]>

* fix(jcode): read the journal once per turn, key prompts by byte offset

The jcode prompt reader ran a synchronous bounded file scan plus a JSON
parse on every hook event. jcode blocks on pre_tool, so a turn that ran
four tools charged the user eight scans of latency it did not need — the
prompt cannot change inside a turn.

- Cache the journal read per pane, refreshed on the turn boundary that
  can change it. The cache holds the whole evidence record, since
  hasExplicitUserPrompt needs the transcript-evidence flag and not just
  the text, and it joins the existing pane-scoped lifecycle (close,
  rename, reset) rather than living in a module singleton.
- Key a journal prompt by its absolute byte offset instead of its
  region-local line index. The backward scan windows the file from EOF,
  so appending shifted every boundary and reminted the key for a prompt
  that never moved; a repeated turn_end then slipped past the same-hash
  dedupe as a second done event with duplicate telemetry.
- Pin the platform in the daemon pre-warm tests. The pre-warm is a no-op
  off POSIX, so the dedupe and retry cases would have passed vacuously
  on a Windows runner.

Co-authored-by: czzczz <[email protected]>

* fix(jcode): quote the managed hook path, drop tools from patch prompts

Three fixes, all on paths this PR could not exercise locally.

The managed hook command was stored as a bare path. jcode tokenizes that
string shell-style before exec'ing it directly (parse_hook_command,
crates/jcode-terminal-launch/src/lib.rs): unquoted whitespace splits, and
every unquoted backslash is consumed as an escape. So on Windows
`C:\Users\me\.orca\agent-hooks\jcode-hook.cmd` reached exec as
`C:Usersme.orcaagent-hooksjcode-hook.cmd` and no hook fired at all, and a
POSIX home with a space split into two arguments. Store the path
single-quoted (verbatim, backslashes included), falling back to double
quotes for a path containing a single quote. Existing bare entries are
already repointed by the stale-key path, and getStatus accepts both forms
so the repair is not reported as a user-owned hook. The quoting helper was
previously dead code that only tests called; the three production sites
now use it. isJcodeManagedCommand also normalizes separators, since a
`/`-only needle never matched a Windows entry.

Commit-message generation feeds a staged patch to `jcode run` as the
prompt — attacker-influenced text — while jcode's default profile exposes
shell, read, write, and MCP. Pass `--tool-profile none`, which resolves to
an empty allowed-tool set in jcode's config (base_allowed_t…
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.

2 participants