Repository navigation
Open
Description
Summary
codex-local currently runs the TUI in-process (--no-daemon, plus features.daemon_auto_start=false; see the PR stack, 12/12). This issue tracks an optional, later phase in which codex-local can use upstream's app-server daemon the way stock codex 0.162+ does.
Why it's off today
- Hook registrations are in-process. codex-local's hooks (H2 Ollama
/modellist, H3 resume sanitizer, H4 all-provider picker) are registered in thecodex-localprocess. A daemon started from stock's package would run stock code without them. - Packaging. Upstream's daemon bootstrap needs a complete package next to the executable:
codex-package.json,bin/codex,bin/codex-code-mode-host,codex-path/rg, and on Windows the sandbox helpers (app-server-daemon/src/prepare_install.rs). codex-local ships as a bare binary, which caused the "no complete local package" error. - Updater. Upstream's
daemon-updaterwould pull stock releases over a fork build.
What we lose without it
- Work dies with the terminal. Turns and sub-agent fan-outs stop when the terminal closes (no "Disconnected... running work continues"). Rollouts are kept and
codex-local resumeworks. - No cross-terminal management.
codex agentscan't list or stop codex-local tasks from another terminal. - No other front ends. The desktop app and IDE can't attach.
- Slower start. Startup is a little slower, because there's no warm engine.
Workaround: run codex-local inside tmux or screen.
Proposed approach
- Package format. Ship codex-local as a package from
local-release.yml: acodex-package.jsonmanifest,bin/codex-local, the code-mode host,rg, and the platform helpers. Install it under$CODEX_LOCAL_HOME/packages/.... Daemon files already live underCODEX_HOME=~/.codex/local, so they're isolated from stock. - Daemon entry point. The daemon must be
codex-local app-server, so it goes through codex-local'smainand registers H2/H3/H4. Verify that the launched server path doesn't bypass the registrations. - Updater. Disable it, or point it at
local-v*releases on this repo, never at stock releases (prepare_install.rs, auto-update selection). - Default mode. Remove the
--no-daemoninjection only when the package is present; keep in-process as the fallback. - Tests.
- Daemon start and attach with a pseudo-TTY.
- Detach and reattach a running turn.
codex agentslists codex-local tasks.- Stock's daemon (PID, socket, locks under
~/.codex) stays untouched. - The fork surface stays within budget.
References
- The root-cause plan is in the PR stack notes (
local/docs/plan-deltas.md). - Isolation evidence: daemon socket, PID and lock paths derive from
CODEX_HOME(app-server-daemon/src/lib.rs,app-server-transport/src/transport/mod.rs).
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity