Skip to content

fix(terminal): run Codex in Orca terminals without the shared background server - #23900

Merged
Jinwoo-H merged 4 commits into
mainfrom
jinwoo/codex-no-daemon-shell
Sep 29, 2026
Merged

Jinwoo-H merged 4 commits into
mainfrom
jinwoo/codex-no-daemon-shell

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Since Codex 0.157, the first codex you open starts one shared background server, and every later Codex tab quietly plugs into it. That server runs every tab's hooks and tools with the first tab's Orca identity, and it dies when the first tab closes. So in Orca every Codex tab reported as the first tab, and closing that tab killed all the others. Orca now starts Codex with --no-daemon in the terminals it launches Codex in (and wherever its shell function is installed), so each tab runs its own server again.

What Changed

Before (Codex 0.156+ in Orca):

  • A second Codex tab's status, Chat View, mobile "Switch to chat view" and orchestration worker results were attributed to the first Codex tab (or went missing).
  • Closing the first Codex tab ended every other Codex tab with "Connection lost… could not be restored".

After: each Orca Codex tab keeps its own in-process server, so status and orchestration stay with the tab that produced them, and closing one tab leaves the others running. Codex 0.155 and older launch exactly as before.

Mechanism: Orca already writes a codex shell function into its terminals' startup files (codex-shell-launch-preflight.ts). Today it exists only in managed-account terminals and only runs agent hooks prepare-codex. This PR:

  • Defines it in every shell Orca wraps (bash, zsh, fish, PowerShell, both SSH relay overlays). Orca's own Codex launches always carry a startup command, and every such shell is wrapped: bash, zsh (also with no history file), fish on both the local and daemon transports (daemon fish is now wrapped when it has a startup command), and Windows Git Bash (now loads Orca's rcfile when it has a startup command; plain Git Bash tabs stay a normal login shell). Only the prepare-codex step stays gated on ORCA_CODEX_LAUNCH_PREFLIGHT, exactly as today, so it never runs against ~/.codex; the relay now drops any inherited ORCA_CODEX_LAUNCH_PREFLIGHT from pane env, so relay panes never run it.
  • Adds --no-daemon first unless any argument is exactly agents, queue, --no-daemon, --remote or --remote=* (those need the shared server or would make Codex exit 2). A subcommand is always a whole argument, so this also catches codex -m x agents.
  • Only when the installed Codex supports it: it checks codex --help for --no-daemon on every launch (25 ms native, ~80 ms npm). A cache would go stale across upgrades: a stale "yes" breaks 0.155 (exit 2), a stale "no" brings the shared server back.
  • Opt-out: export ORCA_CODEX_ISOLATE=0 in your shell rc, read on every call. It is forwarded into WSL through WSLENV, and rides the existing SSH pty.spawn env map (no new wire field).
  • src/cli/codex-command-classification.ts knows --no-daemon is a flag, so it's no longer misread as a subcommand.

Almost every launch path is typed into the shell, so the one function covers agent launch (codex '<prompt>'), worktree create --agent, worker-start, automations and resume, plus hand-typed codex in any wrapped tab.

Trade-off: Codex "Run in background", codex agents, and opening the same session from the Codex desktop app or an IDE while it's open in Orca don't see sessions started in Orca. Each tab also runs its own server, so many tabs use more memory. A settings toggle and a one-time notice are a follow-up; ORCA_CODEX_ISOLATE=0 restores the old behaviour today.

Why

Borrowed from #23791, each for a concrete failure:

  • PowerShell prep and probe each run inside try/catch: under a user's Set-StrictMode -Version Latest / $ErrorActionPreference = 'Stop' (where Windows PowerShell 5.1 turns redirected native stderr into an error), a noisy or failing prep or probe would otherwise abort the launch. A failed probe just launches without the flag.
  • Piped input is forwarded ($MyInvocation.ExpectingInput): without it, 'prompt' | codex exec - loses stdin once the function exists in every PowerShell pane.
  • zsh local for the function's variables: warn_create_global would print a warning on every call.

Not adopted: his argv parser and option allowlist (the denylist above instead); the ORCA_CODEX_LAUNCH_POLICY env marker (the function reads ORCA_CODEX_ISOLATE itself); restoring $LASTEXITCODE around prep/probe (the launch sets it anyway); loading the PowerShell wrapper from a file (the smaller wrapper here costs less of the command-line budget, see Notes); cmd.exe prep regating and setting the preflight in every pane (this PR doesn't change when the preflight is set); always wrapping Git Bash, relay PowerShell/fish login shells and plain fish tabs (that changes plain tabs' startup chain; listed as gaps).

Linked Issue

Fixes #22873

Supersedes #23791

Visual Proof

N/A: no UI change. The difference is the Codex process argv (--no-daemon) and where hooks report; see Testing.

Testing

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

Automated:

  • codex-shell-no-daemon.test.ts runs the full argv table in real bash, zsh, fish, pwsh and (on Windows) Windows PowerShell 5.1 against a fake codex: 18 argv shapes get the flag, 16 don't (denylist, --remote, a second --no-daemon, the known harmless skips), and denylisted launches never run the --help probe. Nothing is added when --help lacks the flag or with ORCA_CODEX_ISOLATE=0 (read per call); a version swap mid-shell re-probes; piped stdin and the exit status reach Codex; a user alias codex=… defined first still applies in bash and zsh; zsh under warn_create_global + no_unset stays silent; PowerShell under StrictMode Latest + Stop with a failing, noisy prep still launches. Dropping queue from the denylist fails the table in every shell. CI's shell contracts job runs it with ORCA_REQUIRE_PWSH=1.
  • codex-launch-shell-wrapping.test.ts: an Orca codex '<prompt>' launch wraps bash, zsh (no history file, no overlay) and fish on both the local and daemon transports. Daemon fish failed this before the fix.
  • codex-no-daemon-binary-contract.test.ts: --help lists --no-daemon, and --no-daemon <sub> --help exits 0 for every subcommand codex --help lists except the wrapper's denylist. Passes on 0.156.1, 0.157.1, 0.158.0; fails on 0.155.1 as it should. Runs in CI in the existing Codex contract job against a pinned 0.158.0.
  • Also: Git Bash launch-args tests (plain tab stays a login shell, a startup command loads the rcfile), a relay test that an inherited or client-sent ORCA_CODEX_LAUNCH_PREFLIGHT never reaches the pane (fails without the fix), a classifier test for codex --no-daemon resume|exec, and updated shell-wrapper snapshots (local, daemon, relay).
  • Suites: src/main/pty, src/relay, src/cli, src/main/daemon, src/main/runtime, src/main/providers, src/main/ipc and the live-shell suites: 21,631 passed. The 2 failures are repro-13767-shell-ready-marker-lost-to-exec, which fails identically on main on macOS. pnpm tc, oxlint, check:code-quality:changed and oxfmt are clean.

Live, macOS, real Codex (isolated headless dev runtime built from this branch, isolated CODEX_HOME, real turns):

Case Codex Without the fix (ORCA_CODEX_ISOLATE=0, same as main) With the fix
Two tabs, prompt only in tab B 0.158.0 B's turn reported on tab A's pane; one --managed-daemon server, child of A's Codex each turn reported on its own tab; both TUIs codex --no-daemon, no server process
Close tab A, then use tab B 0.158.0 B: "Connection lost. Attempting to reconnect…" B answers normally
Shared server already running (started by plain command codex in tab E) 0.157.1 n/a tabs F and G launch --no-daemon, each turn reported on its own tab; closing E leaves F answering
Two concurrent worker-start --agent codex; A finishes, worker-release A, B (running sleep 60) keeps going 0.158.0 n/a B finished 2 min after A's release and reported worker_done on its own task
worker-start readiness, plain launch (no -c) 0.156.1 / 0.157.1 / 0.158.0 n/a ready / input_accepted in 4–8 s, tasks completed
Agent launch with prompt, terminal create --command "codex '…'" 0.158.0 n/a argv starts --no-daemon
codex login status, codex exec 0.158.0 n/a Logged in, exec answered
Typed codex agents, codex -m x agents, codex resume --remote … stub n/a unchanged argv
Typed codex 0.150.1 / 0.155.1 n/a launches cleanly, no flag

Live, Windows (windows 2): the argv-table suite above passed on the host under Windows PowerShell 5.1 and pwsh 7.6.6 (50 passed, including StrictMode/Stop and piped input). An earlier standalone run of the same table passed in Git Bash 5.3 and WSL Ubuntu 24.04 bash 5.2, and Git Bash started with Orca's generated rcfile added the flag.

Not verified live: SSH relay (tests and snapshots only); an Orca build of this branch on Windows or WSL with a real Codex.

AI Disclosure

Review

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

Known gaps (unchanged from today's behaviour):

  • Hand-typed codex in tabs Orca doesn't wrap keeps using the shared server: plain bash, fish and Git Bash tabs with no startup command, zsh tabs with no Orca overlay and no history file, relay fish/PowerShell and native-Windows relay shells, relay zsh without the remote CLI bridge, and tabs with custom shell args. Orca-launched Codex in those shells is covered. Widening wrapping would replace users' login startup chain, so it's left for a follow-up.
  • Launches that skip shell functions keep using the shared server: command codex, absolute paths, npx @openai/codex, env X=1 codex, scripts, user command overrides and cmd.exe terminals. In fish and PowerShell a user's own alias or function named codex also wins.
  • Already-attached sessions stay attached until Codex is restarted in that tab. Restart the other tabs first and the tab that owns the server last.
  • Upgrade day: already-open shells keep their old startup files, and a terminal daemon that survives the app update keeps writing its old wrapper until it retires. New terminals after a restart of Orca's background terminal service get the fix. Old SSH relays get it when the relay re-uploads.
  • codex remote-control start / pair and codex app-server daemon start typed in an Orca terminal still start a shared server with that terminal's environment. No flag prevents that.
  • Windows PowerShell command-line budget: the wrapper is inlined in the encoded bootstrap, so the largest startup command delivered in the launch args drops from about 4,840 to about 4,025 characters. Longer prompts use the existing typed delivery.

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). Typecheck, changed-file lint and the suites above pass locally, and the build ran; CI covers the rest.

@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Modifies shell wrapper logic for Codex terminal launches.

The PR appears safe to merge; no outstanding finding or new actionable defect was identified.

Summary

The PR launches supported Codex versions without the shared background server in wrapped Orca terminals, while retaining hook preparation where Orca configures it.

  • Adds shell-specific isolation wrappers, an opt-out, and binary and shell contract tests.
  • Removes inherited hook-preparation configuration from SSH relay panes. The previous relay finding is resolved.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Codex invoked in wrapped terminal] --> B{Isolation opted out or argument needs shared server?}
  B -- Yes --> E[Launch Codex unchanged]
  B -- No --> C{Installed Codex help lists --no-daemon?}
  C -- Yes --> D[Launch Codex with --no-daemon]
  C -- No --> E
  R[Relay pane environment] --> S[Remove inherited launch preflight]
Loading

Reviews (3) · Last reviewed commit: "fix(relay): never pass an inherited Code..."

@greptile-apps

This comment has been minimized.

…implify it

Wrap Git Bash and daemon fish only when Orca delivers a startup command, so plain
tabs keep their login shell. One POSIX/fish/PowerShell body with a shared
denylist, a flat PowerShell probe, and tests for probe skipping, the Windows
PowerShell 5.1 lane and --no-daemon classification.
Comment thread src/relay/pty-shell-overlay-wrappers.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

This run reviewed the whole PR: a shell-wrapper change that stops Orca Codex tabs from joining Codex 0.156+'s shared background app-server.

  • Wrapper installed in every wrapped terminal — codex() is now defined whenever a real codex binary resolves, rather than only when a managed hook preflight is set; the prepare-codex call stays runtime-gated on ORCA_CODEX_LAUNCH_PREFLIGHT.
  • --no-daemon rule — prepended first unless a whole argument is agents/queue/--no-daemon/--remote/--remote=*, mirroring the denylist in bash, zsh, fish and PowerShell.
  • Support probe — codex --help is checked on every launch (no cache), so 0.155 and older keep launching unchanged; POSIX and fish redirect stdin for the probe.
  • Opt-out — ORCA_CODEX_ISOLATE=0, read per call, plus WSLENV /u passthrough for WSL.
  • Windows Git Bash — always starts from Orca's rcfile when the wrapper tree exists (was managed-only).
  • Relay and zsh layout — the wrapper moves outside the overlay feature guard; relay overlays install it without hook prep.
  • Tests and CI — a real-shell argv table plus a pinned real-binary contract, and new change-scope prefixes for the contract job.

ℹ️ Notes

  • src/main/providers/agent-foreground-process-git-bash.win32.test.ts still labels its no-preflight case login shell; since this PR makes that path use the rcfile wrapper whenever the tree exists, the label (and the matching comment in windows-shell-args.test.ts) no longer describes what runs. Worth a rename next time the file is touched.
  • src/main/pty/wsl-orca-env.test.ts never sets ORCA_CODEX_ISOLATE, so the new ORCA_CODEX_ISOLATE/u passthrough entry has no direct assertion; the existing ORCA_CODEX_LAUNCH_PREFLIGHT/p case is a natural place to add one.

I also checked the one place that looked risky — the fish denylist calling string match ... $argv with empty $argv on a piped stdin. Running the real wrapper against fish 3.7 with a fake codex showed stdin is preserved (printf piped | codex reaches Codex as ARGV|--no-daemon|stdin=piped), so there is no stdin-consumption regression.

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.

✅ No new issues found.

Reviewed changes

This run re-reviewed only what landed since the prior pullfrog review at fc79028: 4319993576 ("narrow the codex wrapper to Orca-launched shells and simplify it").

  • Narrowed Windows Git Bash — getGitBashLaunchCommand() uses Orca's rcfile only when a managed preflight or a startup command is present, so a plain Git Bash tab is a login shell again.
  • Simplified the flag rule — every shell now builds one argument list with set -- --no-daemon "$@" / set argv --no-daemon $argv from a shared CODEX_SHARED_SERVER_ARGS and pattern, instead of a separate if/else invocation.
  • PowerShell drops the child scope — hook prep and the --help probe are each wrapped in try/catch rather than toggling StrictMode/ErrorActionPreference; $input forwarding and the $LASTEXITCODE assignment are kept.
  • Wrapper is unconditional in the wrapper templates — codexLaunchPreflight is removed from ZshWrapperRestoreSpec (local/daemon/relay specs updated); the relay overlays install it with the runtime env gate doing the gating.
  • Markerless fish wraps when a startup command exists — daemon getShellLaunchConfig gains hasStartupCommand, mirrored by the local provider's startupCommand parameter.
  • Tests — new codex-launch-shell-wrapping.test.ts, a Windows lane in codex-shell-no-daemon.test.ts (.cmd shim + powershell 5.1, no longer win32-skipped), and a plain-vs-launch Git Bash case. All pass locally (bash/pwsh; fish/zsh unavailable here).

ℹ️ Hand-typed codex is only covered inside a shell Orca wraps

The narrowing makes the fix depend on the pane being wrapped at all: a plain Windows Git Bash tab (--login -i) and a non-overlay plain bash/fish terminal never define the codex function, so a hand-typed codex there still joins the shared server. Orca-launched Codex (always carrying a startup command) and shells already wrapped for an overlay/history are covered, so the primary #22873 path is fixed — but the description's "the one function covers typed codex" now overstates it. Worth confirming this is intended and noting the exception in the description.

Technical details
# Typed-codex coverage after the narrowing

## Affected sites
- `src/main/providers/windows-shell-args.ts:220` — `getGitBashLaunchCommand(Boolean(codexLaunchPreflightCommand) || Boolean(startupCommand))`; `false` yields `GIT_BASH_UTF8_LOGIN_COMMAND`, which never sources Orca's rcfile, so no `codex()` exists.
- `src/main/providers/local-pty-finalize-environment.ts:117` — a plain terminal has no startup command and no overlay key, so `selectShellStartupFeatures` returns `[]` and `getShellLaunchConfig('/bin/bash', [])` returns `UNWRAPPED`.
- `src/main/daemon/shell-ready.ts:154` — same `features.length === 0` early return for bash.

## Required outcome
- Either accept the gap and make the description precise ("covers Codex that Orca launches; a hand-typed `codex` in an unwrapped plain terminal still joins the shared server"), or wrap those shells too.
- Codex started by Orca (startup command present) is unaffected: `hasStartupCommand` forces the `markers` feature and therefore the wrapper.

## Open questions for the human
- Is a plain Windows Git Bash tab intentionally outside the fix, given PowerShell panes still get the wrapper from the always-on OSC133 bootstrap?

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

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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

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: 08cc19cd-fbd3-4926-b76f-cad33aebb1ee

📥 Commits

Reviewing files that changed from the base of the PR and between 4319993 and 6288b3a.

📒 Files selected for processing (2)
  • src/relay/pty-handler-spawn-environment.test.ts
  • src/relay/pty-handler.ts

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


📝 Walkthrough

Walkthrough

Shell wrappers now add --no-daemon when isolation is enabled, the arguments are eligible, and Codex help advertises the option. The changes also update shell launch configuration, command classification, WSL environment passthrough, cross-shell tests, and workflow checks for shell and binary contracts.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 6288b

Relay Codex launches will not run the inherited hook-preparation command, matching the stated relay behavior. No material merge risk is apparent.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 6288b

Per-terminal Codex isolation addresses cross-tab identity mixing without a demonstrated new trust-boundary bypass. It remains conditional on the shell wrapper and installed Codex support, so some sessions can retain the older shared-server behavior.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The relevant exposure is cross-tab hook attribution and process lifetime within an Orca terminal session. Isolation reduces reliance on a first tab's shared Codex server only for eligible wrapped invocations.

Trust Boundaries and Controls

  • observed — Although relay spawn accepts a supplied environment, it deletes the executable preflight path before passing that environment to the shell. The downstream wrapper invokes preflight only when the path remains present and executable.

Resilience and Maintainability Implications

  • inferred — Failure to find wrapper files or a supporting Codex binary can leave a session on its prior behavior rather than enforce isolation. This is a bounded limitation of the mitigation, not an established new attack path.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 27 functions across 20 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 Issue [#22873] requires per-worker Codex hook attribution and independent worker lifecycles. The PR adds --no-daemon injection for supported Codex launches across POSIX shells, fish, PowerShell, Git…
Out of Scope Changes check ✅ Passed The CI contract updates, command classification change, shell launch routing, WSL environment passthrough, relay preflight handling, and cross-shell tests support the Codex isolation behavior for [#22…
Title check ✅ Passed The title clearly summarizes the primary change: preventing Codex terminals from using the shared background server.
Description check ✅ Passed The description follows the repository template and provides clear user impact, implementation details, rationale, linked issue, testing results, limitations, and checklist status. The empty Review an…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

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.

@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

This run reviewed the one commit that landed since the prior pullfrog review at 4319993 — 6288b3a ("never pass an inherited Codex preflight into relay panes").

  • Relay drops the Codex preflight env — PtyHandler.buildSpawnEnv now deletes ORCA_CODEX_LAUNCH_PREFLIGHT from every relay pane env, after the env augmenters and before the envToDelete pass, so neither a value inherited from the relay process nor one forwarded by the client can reach a relay pane's codex() wrapper. The relay never mints one of its own (the desktop host-env/assembly.ts is the only setter), so nothing legitimate is stripped.
  • Test covers both sources — pty-handler-spawn-environment.test.ts asserts the variable is absent from the spawned env for both the process and client origins, with process.env restored in a finally.

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

@Jinwoo-H
Jinwoo-H merged commit 9420d49 into main Sep 29, 2026
56 checks passed
Jinwoo-H added a commit that referenced this pull request Sep 29, 2026
Jinwoo-H added a commit that referenced this pull request Sep 29, 2026
#23907)

Terminal daemons survive app updates, so new tabs keep spawning from the
old v36 daemon and never get #23900's Codex shell function. Bump to v37
so new tabs move to a fresh daemon; v36 owners stay attachable.
Jinwoo-H added a commit that referenced this pull request Sep 29, 2026
#23907)

Terminal daemons survive app updates, so new tabs keep spawning from the
old v36 daemon and never get #23900's Codex shell function. Bump to v37
so new tabs move to a fresh daemon; v36 owners stay attachable.

(cherry picked from commit 8f4a740)
brennanb2025 added a commit that referenced this pull request Sep 29, 2026
…ORCA_CODEX_ISOLATE=0

The previous commit made the codex shell function pass
-c features.daemon_auto_start=true when ORCA_CODEX_ISOLATE=0. In a home
whose socket path exceeds sun_path (macOS managed account homes), that
makes Codex auto-start a server it cannot bind, and Codex treats that
failure as fatal, so codex would not start at all.

Orca-owned homes now have no opt-out; the shell function is back to
#23900's behaviour. A per-launch -c features.daemon_auto_start=true is
the manual route in short homes. The test comment rewording from the
previous commit stays.
Jinwoo-H added a commit that referenced this pull request Sep 30, 2026
…er (#23929)

* feat(settings): add a setting to run Codex terminals on Codex's shared server

Off injects ORCA_CODEX_ISOLATE=0 into new terminals on every host (local,
daemon, SSH relay, WSL), which the codex shell wrapper from #23900 reads
to skip --no-daemon. On (the default) injects nothing.

* feat(terminal): announce per-terminal Codex servers once

Shows a one-time toast the first time a Codex terminal starts, with an
Open Settings action that lands on the new Codex server setting. The
seen flag persists in UI state and is set when the toast is shown.

* fix(settings): drop the status warning from the Codex server setting

* fix(terminal): simplify the Codex shared-server notice

* fix(terminal): say agent status in the Codex notice

* fix(settings): hide the Codex server setting from paired web search

Gives its search entry an id and gates it with
includeCodexTerminalServerIsolation, as the other host-only rows are, so
a paired web client cannot find a row it never renders. Its search
keywords now use catalogued agents-search keys instead of missing ones;
CODEX_ISOLATE_ENV is no longer exported; the toast id comment names the
case it guards.

* test(settings): assert the Codex server search gate through the metadata builder

Calling getAgentsPaneSearchEntries directly stayed green with the web
gate deleted; the metadata builder test fails without it.
Jinwoo-H added a commit that referenced this pull request Sep 30, 2026
…er (#23929)

* feat(settings): add a setting to run Codex terminals on Codex's shared server

Off injects ORCA_CODEX_ISOLATE=0 into new terminals on every host (local,
daemon, SSH relay, WSL), which the codex shell wrapper from #23900 reads
to skip --no-daemon. On (the default) injects nothing.

* feat(terminal): announce per-terminal Codex servers once

Shows a one-time toast the first time a Codex terminal starts, with an
Open Settings action that lands on the new Codex server setting. The
seen flag persists in UI state and is set when the toast is shown.

* fix(settings): drop the status warning from the Codex server setting

* fix(terminal): simplify the Codex shared-server notice

* fix(terminal): say agent status in the Codex notice

* fix(settings): hide the Codex server setting from paired web search

Gives its search entry an id and gates it with
includeCodexTerminalServerIsolation, as the other host-only rows are, so
a paired web client cannot find a row it never renders. Its search
keywords now use catalogued agents-search keys instead of missing ones;
CODEX_ISOLATE_ENV is no longer exported; the toast id comment names the
case it guards.

* test(settings): assert the Codex server search gate through the metadata builder

Calling getAgentsPaneSearchEntries directly stayed green with the web
gate deleted; the metadata builder test fails without it.

Backport: #23744 (workspace trust setting) is not on this branch, so its adjacent setting, search entry and test are left out.

(cherry picked from commit a0abcb6)
Jinwoo-H added a commit that referenced this pull request Sep 30, 2026
#24033)

#23900 probes codex --help before each launch; the fake counted it as a worker spawn, breaking two specs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant