Client or integration
Codex CLI
Area
Service lifecycle
Summary
The Linux systemd user unit generated by ocx service install embeds the absolute, versioned OpenCodex CLI and bundled Bun paths. When OpenCodex is installed through mise, mise upgrade opencodex installs the next release under a different version directory without running OpenCodex's own update workflow, so the installed unit remains tied to the previous version.
Once mise removes the previous install or the service is restarted after pruning, systemd has no executable at the baked path and the background proxy cannot start. ocx service repair fixes the unit, but it has to be run manually after every external package-manager upgrade.
I currently need this mise configuration as a local workaround:
opencodex = { version = "latest", postinstall = 'if test -f "$HOME/.config/systemd/user/opencodex-proxy.service"; then "$MISE_TOOL_INSTALL_PATH/node_modules/.bin/ocx" service repair; fi' }
The guard makes a first installation without a service a no-op and forces an existing service to be re-baked after mise changes the install path.
Expected: an installed OpenCodex service remains startable across supported external package-manager upgrades, or OpenCodex provides a package-manager-independent launcher/service path that does not require a per-manager postinstall repair hook.
Actual: the service definition is coupled to one mise version directory and becomes stale when that directory is replaced or pruned.
Reproduction
-
Install OpenCodex through mise:
mise use -g opencodex@latest
-
Install the Linux user service:
-
Inspect the generated unit:
systemctl --user cat opencodex-proxy.service | grep -E '^(ExecStart|Environment="OCX_BUN_RUNTIME_PATH)='
Both the bundled Bun runtime and CLI entry point are under a version-specific path such as:
/home/<user>/.local/share/mise/installs/opencodex/2.35.0/...
-
Upgrade to the next OpenCodex release through mise:
-
Confirm the unit still names the previous version directory. After that old install is removed or pruned, restart the user service or reboot:
systemctl --user restart opencodex-proxy.service
ocx status
-
Repairing manually re-bakes the unit and restores service health:
ocx service repair
ocx status
This is distinct from #2411 and #2412. Their released fixes improve routing visibility and correctly reject a version-manager-owned Codex shim, but they do not make the OpenCodex systemd service survive an external OpenCodex package upgrade.
Version
2.35.0
Operating system
Ubuntu 24.04.4 LTS on WSL2, kernel 6.18.33.2-microsoft-standard-WSL2
Provider and model
Not provider- or model-specific.
Logs or error output
$ systemctl --user show opencodex-proxy.service -p ActiveState -p UnitFileState
ActiveState=active
UnitFileState=enabled
$ systemctl --user cat opencodex-proxy.service
# ExecStart and OCX_BUN_RUNTIME_PATH both contain:
/home/<user>/.local/share/mise/installs/opencodex/2.35.0/...
Checks
Client or integration
Codex CLI
Area
Service lifecycle
Summary
The Linux systemd user unit generated by
ocx service installembeds the absolute, versioned OpenCodex CLI and bundled Bun paths. When OpenCodex is installed through mise,mise upgrade opencodexinstalls the next release under a different version directory without running OpenCodex's own update workflow, so the installed unit remains tied to the previous version.Once mise removes the previous install or the service is restarted after pruning, systemd has no executable at the baked path and the background proxy cannot start.
ocx service repairfixes the unit, but it has to be run manually after every external package-manager upgrade.I currently need this mise configuration as a local workaround:
The guard makes a first installation without a service a no-op and forces an existing service to be re-baked after mise changes the install path.
Expected: an installed OpenCodex service remains startable across supported external package-manager upgrades, or OpenCodex provides a package-manager-independent launcher/service path that does not require a per-manager postinstall repair hook.
Actual: the service definition is coupled to one mise version directory and becomes stale when that directory is replaced or pruned.
Reproduction
Install OpenCodex through mise:
Install the Linux user service:
Inspect the generated unit:
Both the bundled Bun runtime and CLI entry point are under a version-specific path such as:
Upgrade to the next OpenCodex release through mise:
Confirm the unit still names the previous version directory. After that old install is removed or pruned, restart the user service or reboot:
Repairing manually re-bakes the unit and restores service health:
This is distinct from #2411 and #2412. Their released fixes improve routing visibility and correctly reject a version-manager-owned Codex shim, but they do not make the OpenCodex systemd service survive an external OpenCodex package upgrade.
Version
2.35.0
Operating system
Ubuntu 24.04.4 LTS on WSL2, kernel 6.18.33.2-microsoft-standard-WSL2
Provider and model
Not provider- or model-specific.
Logs or error output
Checks