Skip to content

fix: disable daemon auto-start in the snap - #52

Open
wubli wants to merge 1 commit into
nysasounds:masterfrom
wubli:daemonAutoStartFix
Open

wubli wants to merge 1 commit into
nysasounds:masterfrom
wubli:daemonAutoStartFix

Conversation

@wubli

@wubli wubli commented Oct 5, 2026 •

Copy link
Copy Markdown

Summary

Codex 0.157.0 turned daemon_auto_start on by default (openai/codex#47179). This repo picked that up with #48 (0.154.0 → 0.159.2). The daemon only works from an upstream packaged install, so in the snap a plain codex exits before the TUI starts. The build and the existing CI checks still pass, because --version and help never reach this code path.

codex (TUI launch)
  config: /etc/codex/config.toml          ← new, lowest precedence
          ~/snap/codex/current/config.toml  overrides it
  daemon_auto_start?
    true  → prepare daemon install → no packaged CLI → error, exit 1   (snap today)
    false → TUI starts as it did before 0.157.0                        (this PR)
 snap/
 ├── hooks/configure
+├── local/etc/codex/config.toml   # [features] daemon_auto_start = false
 └── snapcraft.yaml                # + `defaults` dump part, + layout /etc/codex → $SNAP/etc/codex
 .github/workflows/ci.yaml         # + "Snap TUI": run `codex` under `script` for 30s, pass = still running (exit 124)

Independent of #50. #51 (0.160.0) still enables the daemon by default, so it needs this too.

Evidence

  • Before: installed 0.159.2 snap with the setting forced back on, codex -c features.daemon_auto_start=true:

    Error: this CLI has no complete local package; install a packaged Codex CLI or use the standalone installer
    

    Exit 1.

    After: codex keeps running until timeout kills it (exit 124). In CI, the "Snap TUI" step passes in https://github.com/wubli/codex/actions/runs/37165586506. That run was on a fork test branch that also carried Add codex-code-mode-host binary #50's commits. This fix commit is the same change.

Merge Danger

Door: two-way

Adds only a default config file, a layout and a CI step. Reverting removes them. A user's own config.toml can still set daemon_auto_start = true.

Blast Radius: snap-startup

Inside the snap, the shared background server stays off, which never worked in the snap anyway. Any host /etc/codex is hidden from the snap by the layout.

🤖 Generated with Claude Code

Codex 0.157.0 enabled the shared app-server daemon by default. It only
runs from an upstream packaged install (codex-package.json layout), so
the snap TUI exited with "this CLI has no complete local package".

Ship /etc/codex/config.toml via a layout to turn daemon_auto_start off
as the lowest precedence system config, and test that the TUI starts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EprajrSwjJKy29ZXnEvpwm
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.

1 participant