Repository navigation
Conversation
Upstream auto-starts/discovers an app-server daemon for the TUI, which needs a full codex-package.json package; codex-local ships a bare binary, so a fresh home failed with "no complete local package". Inject --no-daemon for plain TUI, resume and fork (unless --remote), add -c features.daemon_auto_start=false, and seed it off. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPCzgwU247gMtjybR5v4iR
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPCzgwU247gMtjybR5v4iR
Upstream restores provider/model from the rollout on resume unless a CLI layer sets them, so a resumed stock session would call OpenAI. Always inject model_provider and model (flag > CODEX_LOCAL_MODEL > config). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPCzgwU247gMtjybR5v4iR
The codex-local bin include!s upstream cli/main.rs, so testing the whole package also runs upstream's cli tests, whose snapshots assume the binary is named codex and fail here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RPCzgwU247gMtjybR5v4iR
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause: upstream 0.162.1 enables
features.daemon_auto_startby default, so an eligible local TUI launch discovers/starts the app-server daemon. Bootstrapping it needs a complete package (codex-package.json,bin/codex, helpers) next to the executable; codex-local distributes a bare binary, so a fresh home fails with "no complete local package". (--ollama-urland the retry overrides happened to exclude the daemon, which hid it.)Why a daemon is wrong for codex-local: its model/resume registrations live in-process; a daemon-hosted server would not have them.
Fix (0 upstream lines; fork surface stays 122 lines):
inject_no_daemonhelper runs beforecli_main: it classifies argv with upstream's ownMultitoolCli::try_parse_fromand inserts--no-daemonafter argv[0] only for plain TUI,resume,fork, with no--remote(root or subcommand) and no existing--no-daemon. Parse failures (help/errors), exec, review, app-server and everything else pass through unchanged.-c features.daemon_auto_start=falseon every run, and seeded[features] daemon_auto_start = false.Stock is unaffected: separate homes and sockets; codex-local never discovers, starts or stops stock's daemon. Verified stock daemon PIDs and socket inode unchanged.
Tests: table-driven injection test (TUI, prompt, resume id/--last, fork, existing flag, --remote at both scopes, exec, app-server (+daemon), --help, invalid arg,
--exec); override and seed tests. Live: TUI andresume --lastfrom a temp non-repo dir under a pty with no package error and no daemon artifacts;execagainst Ollama works.🤖 Generated with Claude Code
https://claude.ai/code/session_01RPCzgwU247gMtjybR5v4iR