codex icon indicating copy to clipboard operation
codex copied to clipboard

[macOS][regression] `codex_app` MCP override makes `CODEX_APP_SERVER_USE_LOCAL_DAEMON=1` unreachable

Open johnnyeven opened this issue 3 months ago • 11 comments

Summary

After updating ChatGPT Desktop, the existing managed local App Server path no longer works in a normal Desktop startup.

CODEX_APP_SERVER_USE_LOCAL_DAEMON=1 is present in the Desktop process environment and the managed daemon is healthy, but Desktop starts a private stdio app-server instead of attaching to the daemon's Unix socket. If another local client is already using the same thread through the managed daemon, Desktop then shows:

This is open in another app
Close it there to continue here.

This appears to be a startup-logic regression caused by the new app-managed codex_app MCP override.

Environment

  • ChatGPT Desktop: 26.820.60940 (build 7119)
  • Bundled Codex: codex-cli 0.150.0-alpha.8
  • Standalone managed Codex/App Server: 0.149.1
  • Bundled codex-app-tools plugin: 0.1.3
  • macOS: 26.5.2 (25F84)
  • Architecture: Apple Silicon / arm64

Managed daemon status before launching Desktop:

{
  "status": "running",
  "backend": "pid",
  "managedCodexVersion": "0.149.1",
  "socketPath": "$CODEX_HOME/app-server-control/app-server-control.sock",
  "cliVersion": "0.150.0-alpha.8",
  "appServerVersion": "0.149.1"
}

Previously working behavior

Before the Desktop update, this setup worked:

ChatGPT Desktop ────────┐
                        ├─ managed app-server --listen unix://
local sidecar/client ───┘

Both clients connected to the same Unix socket and could observe/continue the same live thread.

This is the same shared-daemon topology documented in #31991.

Steps to reproduce

  1. Install the standalone Codex package.

  2. Start the managed App Server:

    codex app-server daemon bootstrap
    
  3. Ensure the Desktop process receives:

    launchctl setenv CODEX_APP_SERVER_USE_LOCAL_DAEMON 1
    
  4. Fully quit and restart ChatGPT Desktop.

  5. Connect a second local client to $CODEX_HOME/app-server-control/app-server-control.sock.

  6. Open or continue a thread through that client.

  7. Open the same thread in ChatGPT Desktop.

Actual behavior

Desktop does not attach to the managed daemon. It uses a private stdio app-server, so the system has two app-server processes with separate writer ownership:

ChatGPT Desktop ── private app-server --listen stdio://
local client ───── managed app-server --listen unix://

Opening the managed-daemon thread in Desktop produces the active-writer / “open in another app” conflict.

Fully quitting Desktop releases its private writer, but that defeats the shared-client workflow.

Diagnostic evidence

Inspection of the packaged Desktop startup logic shows that the managed-daemon branch is selected only when all of the following are true, including:

configOverrides.length === 0 &&
process.env.CODEX_APP_SERVER_USE_LOCAL_DAEMON === "1"

The same startup now creates the Codex app-tools native pipe, sets CODEX_APP_TOOLS_PIPE_PATH, reads the bundled codex-app-tools/desktop-mcp.json, and returns a request-level override for:

mcp_servers.codex_app

Therefore, on a healthy normal Desktop startup:

codex_app native pipe starts
  → mcp_servers.codex_app override is non-empty
  → configOverrides.length !== 0
  → managed-daemon branch is skipped
  → private stdio app-server is spawned

The daemon version gate is not the blocker: the packaged minimum is older than 0.149.1, so this execution path is rejected before daemon version selection matters.

The current Desktop process environment was also checked:

CODEX_APP_SERVER_USE_LOCAL_DAEMON=set
CODEX_APP_TOOLS_PIPE_PATH=set
CODEX_CLI_PATH=unset
CODEX_APP_SERVER_FORCE_CLI=unset
CODEX_APP_SERVER_WS_URL=unset

Expected behavior

If CODEX_APP_SERVER_USE_LOCAL_DAEMON=1 is set and a compatible daemon is healthy, Desktop should attach to it.

At minimum, one of these should be supported:

  1. Give the explicit local-daemon setting precedence and disable Desktop-only app tools with a clear warning.
  2. Provide a supported setting to disable the app-managed codex_app MCP injection.
  3. Make the codex_app tools client/session-scoped so they do not require a process-wide app-server config override.
  4. Support per-connection config overlays on the managed daemon.

Why this is distinct from a generic writer-lock issue

The writer conflict is the visible symptom. The earlier transport-selection decision is the regression: an automatically injected Desktop MCP override makes the existing local-daemon branch unreachable during normal startup.

Related reports cover the individual symptoms, but not this combined cause:

  • #31991 — previously working Desktop + managed App Server topology
  • #37403 — Desktop/CLI/Remote thread gets already has an active writer after update
  • #40157 — standalone app-server/Remote → Desktop produces “opened in another app”
  • #40860 — Desktop injects mcp_servers.codex_app even when absent from user config
  • #40819 — request-level codex_app config overrides file-level configuration

Additional note

I understand that CODEX_APP_SERVER_USE_LOCAL_DAEMON is undocumented. However, the current Desktop bundle still contains the environment-variable check, daemon discovery/version gate, and Unix-socket transport path. The automatic codex_app override now prevents that retained path from being selected.

No thread IDs, usernames, repository names, or private paths are included.

johnnyeven avatar Aug 27 '26 01:08 johnnyeven

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #40134

Powered by Codex Action

github-actions[bot] avatar Aug 27 '26 01:08 github-actions[bot]

Confirmed this still reproduces on the current macOS Desktop/SSH stack, with the same root cause described here.

Current environment

  • ChatGPT/Codex Desktop: 26.825.51511 (build 7377)
  • Desktop-bundled Codex: 0.151.0-alpha.7.2
  • Managed standalone Codex/App Server used by Remote SSH: 0.151.0
  • macOS: Apple Silicon

Exact topology

The local Desktop starts its private bundled server:

.../Contents/Resources/codex
  -c features.code_mode_host=true
  app-server
  --analytics-default-enabled
  -c mcp_servers.codex_app={...}

The Desktop's saved SSH connection independently bootstraps the managed server:

codex -c features.code_mode_host=true app-server --listen unix://

Both processes use the same Codex home and thread store.

Reproduction and lock ownership

  1. Open/resume a thread in the host's local Desktop.
  2. Open the same host through Remote SSH from a second Mac.
  3. Attempt to open the same thread remotely.
  4. Remote thread/resume repeatedly fails with:
thread-store conflict: thread <redacted> already has an active writer

lsof confirms the Desktop-bundled app-server holds the corresponding thread-writer-locks/<redacted>.lock file.

The direction is symmetric. After the local Desktop releases ownership and the SSH app-server resumes the thread, lsof shows the SSH app-server holding that same lock; the local Desktop then becomes the side that cannot resume it.

This was reproduced on two different remote hosts. No CODEX_HOME, CODEX_CLI_PATH, CODEX_APP_SERVER_WS_URL, CODEX_APP_SERVER_FORCE_CLI, or CODEX_SSH_SKIP_APP_SERVER_BOOT override is required.

Packaged-code confirmation

The current Desktop bundle still contains the local-daemon transport path guarded by CODEX_APP_SERVER_USE_LOCAL_DAEMON=1. It also still requires the request-level config override list to be empty before selecting that path.

A normal Desktop launch injects both features.code_mode_host=true and the app-managed mcp_servers.codex_app override. Consequently, the override list is non-empty and Desktop selects a private stdio app-server instead of the healthy managed daemon socket.

The managed daemon itself is healthy and version-compatible:

{
  "status": "running",
  "managedCodexVersion": "0.151.0",
  "cliVersion": "0.151.0-alpha.7.2",
  "appServerVersion": "0.151.0"
}

Impact

This breaks the intended host workflow:

Codex Desktop open on remote Mac
+ Codex Desktop on another Mac connected to that host over SSH
+ same thread

The thread can be listed and its metadata can be discovered, but only the app-server that currently owns the writer lock can resume and operate it. Fully quitting one surface merely transfers which side can work; it does not provide shared access.

The exclusive writer lock appears to be functioning correctly. The missing piece is either:

  1. making codex_app tools connection/session-scoped so Desktop can share the managed daemon;
  2. supporting per-connection overlays on the daemon; or
  3. providing an explicit read-only follower plus safe ownership-handoff path across app-server processes.

No thread IDs, hostnames, usernames, repository names, or private filesystem paths are included.

Zollicoff avatar Aug 31 '26 23:08 Zollicoff

I can reproduce a closely related codex_app / shared App Server failure on Windows, but through a different transport path: an externally launched/shared Codex App Server over WebSocket rather than the managed local-daemon path described here.

My setup is:

codex.exe app-server --listen ws://127.0.0.1:45789

and Codex Desktop is pointed at it with:

CODEX_APP_SERVER_WS_URL=ws://127.0.0.1:45789

In that topology, Desktop does connect to the external/shared App Server, but both thread/start and thread/resume fail with:

invalid transport in mcp_servers.codex_app

Important observations:

  • There is no [mcp_servers.codex_app] entry in my user config.toml.
  • New threads fail too, so this is not corrupted persisted thread state.
  • If I stop the shared WebSocket App Server and restart Desktop so it uses its normal built-in/private App Server, the problem disappears.
  • [desktop] runCodexInWindowsSubsystemForLinux = false does not affect this reproduction; this path is not using WSL.
  • I also reported the WebSocket reproduction on #40819: https://github.com/openai/codex/issues/40819#issuecomment-5441372632

So this appears related to the same broader design boundary described in this issue: Desktop-side runtime injection of mcp_servers.codex_app seems to assume an App Server lifecycle/transport managed directly by Desktop, and shared/external App Server topologies can break when that assumption is not true.

The visible failure differs from #41014 — here the shared WebSocket server is selected, but the request-level codex_app configuration becomes invalid — while #41014 shows the override preventing the shared daemon path from being selected at all. That makes these look like two manifestations of the same codex_app runtime-injection architecture problem across different shared App Server transports.

beifangzhishi-ops avatar Sep 01 '26 03:09 beifangzhishi-ops

Additional reproduction notes (2026-09-15)

Observed on both Mac Studio (ChatGPT Desktop / Codex Framework ~152.x, codex-cli 0.154.0) and ubuntu-main:

  • Desktop launches codex app-server with [email protected]_servers.codex_app.enabled=true and CODEX_APP_TOOLS_PIPE_PATH=/tmp/codex-browser-use/<uuid>.sock.
  • Shared control socket ~/.codex/app-server-control/app-server-control.sock is absent while Desktop is running (private stdio app-server), so external clients cannot turn/start into live Desktop threads via the documented unix transport.
  • Built-in cross-task UX ("Sent by ChatGPT from another task") goes through Desktop MCP tool send_message_to_thread on that temp pipe — not a public app-server RPC.

We are tracking a Grok Bot ↔ Codex bridge that needs shared-daemon attach for Grok→Desktop inject:

  • https://github.com/ScriptedAlchemy/grok-bot-cli/issues/24
  • Related: #41112

Happy to provide more process/env dumps if useful.

ScriptedAlchemy avatar Sep 15 '26 00:09 ScriptedAlchemy

Still reproducible on ChatGPT Desktop 26.908.40834.

I independently reproduced the managed-daemon attachment regression on macOS.

What I verified:

  • a standalone managed Codex/App Server 0.154.0 starts successfully;
  • its Unix control socket is created and accepts a WebSocket initialize;
  • CODEX_APP_SERVER_USE_LOCAL_DAEMON=1 is set before a full ChatGPT Desktop restart and is inherited by the restarted Desktop process;
  • Desktop nevertheless launches a separate private stdio app-server;
  • the Desktop thread is not visible through the managed daemon.

Observed topology:

ChatGPT Desktop -> private stdio app-server
local control client -> managed Unix-socket app-server

Expected topology:

ChatGPT Desktop + local control client -> same managed Unix-socket app-server

I also tested the MCP side independently. Dynamic external MCP operation itself works when driven through the Desktop App Server: config/mcpServer/reload, thread-scoped MCP status, model-visible tool mount, one real model-initiated tools/call, disable/reload, and cleanup all succeeded with no leak.

The remaining blocker is specifically the Desktop attachment/control-plane boundary: a UserPromptSubmit hook or local sidecar cannot reach the UI-owned private App Server for same-turn MCP activation through the supported managed-daemon socket because Desktop does not attach to that daemon.

No unsupported process/FD injection, app-bundle patching, CODEX_CLI_PATH override, or manual MCP proxy was used. Test state was restored after reproduction.

This appears to confirm that the codex_app override / private-stdio selection regression described in #41014 is still present in Desktop 26.908.40834.

fistashka05 avatar Sep 15 '26 06:09 fistashka05

Current macOS reproduction and read-only runtime observation requirement

Adding sanitized evidence to this existing issue rather than opening a duplicate. The transport-selection root cause matches #41014. The narrower requirement below is independent, read-only observation of an existing Desktop-owned turn while retaining plugins; it does not require an external client to resume or mutate the thread.

Component and environment

Codex Desktop on macOS 26.6.2, arm64. Desktop version: 26.1007.30912, build 20156. Bundled CLI/app-server: 0.162.0-alpha.17.2. A separately configured managed daemon uses 0.162.1.

Problem

An independent read-only monitoring application cannot obtain authoritative current status for an already-running Desktop-owned thread when Desktop uses a STDIO Owner with plugin configuration overrides.

Observed for the same exact thread T and current turn R:

  • Desktop's trusted task tool reports thread status active, turn status inProgress and the expected cwd.
  • Read-only thread/read and thread/turns/list against the separately configured shared daemon return thread status notLoaded and turn status interrupted for T/R.
  • That daemon is not the loaded runtime Owner. Successful transport and shared persisted history do not establish ownership.
  • The Desktop-owned process has anonymous STDIO connections; no external named app-server listener was observed.
  • Setting CODEX_APP_SERVER_USE_LOCAL_DAEMON=1 did not move the Desktop session to the daemon in this observed configuration. Prior installed-source inspection found that the shared-daemon selection requires absent configuration overrides, while Desktop supplies plugin overrides.

The monitor therefore correctly keeps this session Unknown instead of claiming Running. Reading historical RUNNING fields or repeating a historical status with a new timestamp would manufacture liveness.

Request

Please confirm whether a supported independent, authenticated, read-only Desktop Owner status API already exists. If not, expose one that works for existing STDIO-owned Desktop sessions without disabling plugins, changing Desktop binaries, restarting active sessions, or taking over the thread.

Required minimum capabilities:

  1. Exact thread ID, current/requested turn ID, cwd, runtime thread status and exact turn status.
  2. Fresh Owner observation timestamp, Owner instance/connection generation, and source started/completed timestamps.
  3. Queryable current state, with exact-turn completed/failed/interrupted outcomes. Events alone must not imply indefinite liveness.
  4. Independent read-only authorization restricted to the local user and approved projects. No conversation bodies or tool outputs are needed for the status endpoint.
  5. Explicit rejection of start, resume, steer, interrupt, fork, archive/delete and tool-response operations through this capability. Read must not create a competing Owner, change plugin settings or alter thread lifecycle.
  6. Documented capability/version discovery, stale/unavailable semantics and safe reconnect behavior.

An official local-only transport or SDK export is sufficient. We are not requesting access to an executor's private injected App Tools pipe or caller credentials, and are not proposing Desktop stdout interception.

Reproduction without publishing private session data

  1. Keep normal Desktop plugins enabled and start a harmless bounded task in an isolated project.
  2. Record Desktop's exact thread ID T and current turn ID R privately.
  3. From the separately configured shared-daemon endpoint, initialize a read-only client and request thread/read(T) and thread/turns/list(T) for R. Do not resume or start T on this daemon.
  4. Compare Desktop's actual loaded runtime status with the daemon projection for the same identity and cwd.
  5. The observed mismatch is active/inProgress vs notLoaded/interrupted; an external monitor cannot establish the actual Owner through the available configured endpoint.

This report documents a specific installed configuration, not a claim that all Desktop builds select STDIO whenever any override exists.

Acceptance criteria for a complete solution

  • A separate collector can query the actual Desktop Owner with plugins still enabled, without private caller-context reuse or lifecycle mutation.
  • A real task yields exact T/R active + inProgress with fresh source evidence. The installed monitor's list, detail and Active membership agree on Running.
  • Wrong turn/cwd, replay, conflicting Owner and disconnection cannot yield valid Running; old evidence expires without synthetic heartbeat refresh.
  • The same task finishes naturally. Exact T/R reports completed with source completedAt. List, detail, phase, duration and Completed/Active membership agree.
  • Failed and interrupted outcomes remain distinct; native completion does not invent a canonical business PASS.
  • Refresh, reselection and window reopen preserve terminal state; a later GET of an older Running snapshot cannot overwrite the exact terminal.
  • Existing canonical completion, execution protocol, historical records and unrelated executions remain unchanged.

Privacy

This report intentionally omits real thread/turn IDs, cwd/socket paths, project names, private logs, credentials, session transcripts and screenshots. Additional diagnostics should only be shared through an explicitly authorized channel after review.

Pvxlabs avatar Oct 11 '26 14:10 Pvxlabs

Current macOS confirmation (2026-10-14)

I reproduced the same ownership split with the current installed CLI/app-server 0.162.1:

  • ChatGPT Desktop starts its bundled Codex app-server as a private stdio child.
  • codex agents starts/uses the separate Machine-managed Unix-socket daemon for the same .codex home.
  • The Desktop-owned thread is listed from persisted state but opens as a read-only snapshot in the separate daemon because the Desktop app-server retains the active writer.
  • lsof shows anonymous socketpairs for the Desktop child, no TCP listener, and a separate named socket for the managed daemon.

No process was restarted or signaled, and no writer lock was altered. This confirms the reported external-client limitation still affects the current CLI generation; the supported Desktop owner endpoint / daemon-attachment path remains the missing capability.

nilswx avatar Oct 14 '26 02:10 nilswx

Related feature request: let an agent request compaction of its own conversation in Codex Desktop.

Use case: long-running tasks with distinct phases. After finishing a phase, the agent would like to compact before continuing, rather than waiting for the context limit or a manual /compact.

Suggestion: an App-side tool that queues compaction of the current conversation and runs it at the next safe turn boundary, reusing the existing manual-compaction flow. Scoped to the calling conversation only.

Mentioning it here because the alternative, attaching an external client to the Desktop app-server, is what this issue blocks.

zhangxiaodesign avatar Oct 23 '26 15:10 zhangxiaodesign

I need to control both CLI-started and desktop-started sessions on the same Mac Studio from an iPhone and a second Mac's Codex paired-computer interface, without choosing one origin or closing a session.

On iPhone: “Another Codex session is using this task. Finish and close that session, then try again”. On the second Mac, I can read the chat, but prompts are blocked by “open in another app”.

Verified setup: standalone CLI/shared daemon 0.164.0; desktop-bundled 0.164.0-alpha.11.1. The CLI uses the shared daemon; desktop uses a separate stdio server. Desktop startup injects configuration overrides that fail the shared-daemon eligibility gate even with the internal flag enabled.

Disabling CLI Remote Control removed the 409 “remote app server already online” conflict, but did not make live CLI sessions accessible through the desktop route. A controlled switch to CLI Remote Control restarted the daemon; the CLI reconnected to the same saved thread and the server reported connected. I did not complete an end-to-end iPhone or second-Mac test after that switch, so this is not a confirmed remote-access fix. Choosing the CLI host also sacrifices remote access to desktop-started sessions.

The default CLI/phone fix described in #37967 does not resolve this separate desktop-host route in my setup. Is there a supported unified routing/ownership solution for both session origins, or a clear roadmap for one?

vadimmarmer avatar Oct 27 '26 04:10 vadimmarmer

November 12, 2026: current Linux reproduction and fleet impact

Adding evidence from a read-only investigation of several installed Desktop packages. This still affects the practical workflow of opening the same host and conversation locally in Desktop and remotely over SSH, with CLI/automation using that host's shared app-server.

Observed writer conflict on Linux

On Omarchy, Desktop displayed:

This is open in another app. Close it there to continue here.

For the affected conversation, we verified actual ownership rather than inferring it from process names:

  • A socket-listening app-server (codex -c features.code_mode_host=true app-server --listen unix://) held an open thread-writer-locks/<redacted>.lock file.
  • Linux /proc/<pid>/fdinfo/<fd> reported FLOCK ADVISORY WRITE for that process.
  • The same process had the conversation's rollout open.
  • A separate Desktop backend was running from the bundled executable with:
    -c features.code_mode_host=true
    app-server
    --analytics-default-enabled
    -c [email protected]_servers.codex_app.enabled=true
    
  • The latest inspected turn was completed, and the shared runtime reported the conversation as idle. This was not simply a second user attempting to interrupt an active model turn.
  • SSH codex app-server proxy processes were transport proxies, not additional app-server writers.

This installation has a custom Agent Queue desktop bridge in the private backend's parent chain. That is relevant deployment context, so this is not presented as a clean-room stock reproduction. We separately inspected the installed Desktop transport-selection code, which contains the same blocker described in this issue.

On a CachyOS runtime inspection, a managed daemon and a separate bundled Desktop backend also coexisted. Neither held a conversation writer lock at that inspection; we do not claim that a writer conflict was reproduced there.

The inspected standalone CLI/shared app-server version on the affected Linux host was 0.167.1; the separately inspected CachyOS bundled executable reported 0.167.0-alpha.3.2.

The override guard remains in current installed packages

Read-only ASAR inspection found the same logic in these package.json versions:

Installation Desktop package version
Omarchy / Linux 26.1106.51428
CachyOS / Linux 26.1103.60933
Fedora / Linux 26.1103.31037
macOS 26.1103.60933

The macOS/Fedora entries establish installed-code presence, not a fresh end-to-end writer-conflict reproduction on those machines.

In the inspected packages, local transport selection still requires all of:

platform != win32
configOverrides is empty
host kind == local
CODEX_APP_SERVER_USE_LOCAL_DAEMON == "1"
CODEX_APP_SERVER_FORCE_CLI != "1"
CODEX_CLI_PATH is unset/empty
no explicit codex_cli_command
daemon/version passes the version check

The normal local Desktop callback always contributes:

[email protected]_servers.codex_app.enabled=<true or false>

Therefore the override list is nonempty even if the injected value is false. Merely disabling the plugin in config.toml does not remove this selection blocker.

The currently inspected Linux Desktop processes did not have CODEX_APP_SERVER_USE_LOCAL_DAEMON set. We did not inject it or restart them. The claim here is the independently verified conditional contradiction in the installed code, not a new runtime test with that variable enabled. We have not established the exact minimum accepted daemon version.

Why fixing this matters

  • Users should be able to leave Desktop open on a workstation and continue that host's conversation from another computer over SSH or its local CLI.
  • A completed/idle conversation can remain owned by one server while the other surface refuses to resume it. The user-facing message does not explain that two backends are using the same home.
  • Sharing persisted history is not equivalent to sharing the live runtime. A separate server can discover a conversation without having authoritative information about its current turn, approvals, or tools. This complicates monitoring and agent coordination.
  • Asking users to close one surface, terminate a backend, or force a lock release defeats continuity and risks interrupting unrelated work. The exclusive writer lock should remain intact; clients should converge on the correct owner.
  • A fleet-wide launch policy cannot fix an unreachable attach branch by distributing one environment variable. Nor should the price of shared access be silently losing Desktop tools, browser/Computer Use, approvals, or client callbacks.

Requested behavior / acceptance criteria

Please provide a supported, persistent way for Desktop to select the existing compatible app-server for its user/CODEX_HOME, while preserving Desktop integrations:

  1. Desktop, CLI and SSH clients attach to the same runtime owner.
  2. A conversation opened by one client can be observed and continued through another without competing writer processes.
  3. Desktop app tools and approval/callback routing remain functional, including when the shared server predates the Desktop process.
  4. Closing Desktop does not terminate a shared server still serving other clients.
  5. Incompatibility or attachment failure is reported explicitly rather than silently creating a second owner.
  6. Windows behavior is specified separately: the inspected native Unix-daemon selection branch explicitly excludes win32.

We also found an explicit WebSocket URL selection path before the stdio override callback, but have not validated it as a Desktop workaround or verified tool parity. It should not be interpreted as a tested fix.

No application bundle, configuration, launcher, service, or persistent environment was changed, and no Desktop/daemon restart or forced conversation takeover was performed during this investigation. Private host aliases, addresses, usernames, conversation IDs, PIDs, credentials, and full logs are omitted.

jibanez-staticduo avatar Nov 12 '26 07:11 jibanez-staticduo

We hit the same behavior on a newer Desktop build, so it does not appear to be limited to 26.820.

Environment:

  • Codex Desktop / ChatGPT.app 26.1120.50957 (build 30866)
  • Bundled CLI 0.171.0-alpha.13.2
  • macOS

Steps:

  1. Started a shared app-server with codex app-server daemon start (listening on unix://, control socket at ~/.codex/app-server-control/app-server-control.sock).
  2. Set CODEX_APP_SERVER_USE_LOCAL_DAEMON=1 in the user session via launchctl setenv.
  3. Fully quit Desktop with Command+Q and relaunched it.

Result:

  • The new Desktop main process and its app-server both had CODEX_APP_SERVER_USE_LOCAL_DAEMON=1 in their environment.
  • They also had CODEX_APP_TOOLS_PIPE_PATH set, and the private app-server was started with the codex_app MCP overlay and without --listen unix://.
  • After relaunch there were two app-servers: the shared daemon still listening on the control socket, plus Desktop's private stdio app-server.
  • lsof showed no Desktop (or other client) connected to the control socket.

This matches the report here: the env var is present, but Desktop still spawns a private stdio app-server instead of attaching to the managed daemon.

Fernando-HZ avatar Nov 26 '26 08:11 Fernando-HZ