Skip to content

feat(codex): install Codex CLI via mise + cdx tmux launcher#8

Merged
fx merged 2 commits into
mainfrom
add-codex-agent
May 31, 2026
Merged

feat(codex): install Codex CLI via mise + cdx tmux launcher#8
fx merged 2 commits into
mainfrom
add-codex-agent

Conversation

@fx

@fx fx commented May 31, 2026

Copy link
Copy Markdown
Owner

Adds the OpenAI Codex CLI as a dotfiles-managed agent, mirroring how claude-code is handled — part of moving agent CLIs off the Coder Terraform modules (which post-v5 just install the binary).

Changes

  • run_onchange_after_install-codex.sh.tmpl (new): install codex via mise (npm:@openai/codex); ensures node@lts for the npm backend; pre-creates the shared-home .codex dir (when CODER=true) so setup-shared-symlinks symlinks ~/.codex → shared and codex login persists across rebuilds.
  • dot_bash_aliases / fish config: add cdx — persistent, attachable tmux session running Codex (sibling of ccc, same root→UID-1000 drop). Add DISABLE_AUTOUPDATER=1 to the claude alias so mise owns the version.

Auth

No API key — interactive codex login (ChatGPT account), persisted via shared-home ~/.codex.

Pairs with an infra-repo change that drops the claude-code Coder module from the default template, adds a Codex tile, and moves the root-chown to the agent startup script.

Add the OpenAI Codex CLI as a dotfiles-managed agent, mirroring claude-code:
- install via mise (npm:@openai/codex); ensure node for the npm backend
- pre-create shared-home ~/.codex so setup-shared-symlinks persists `codex login`
- cdx launcher (bash + fish): persistent attachable tmux session, root→UID1000 drop
- claude alias: add DISABLE_AUTOUPDATER=1 (mise owns the version)
Copilot AI review requested due to automatic review settings May 31, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for managing the OpenAI Codex CLI through these dotfiles, aligning it with existing agent CLI tooling (notably Claude Code) and providing a persistent, attachable tmux launcher (cdx) for interactive use.

Changes:

  • Add a chezmoi run_onchange installer to provision Codex CLI via mise (npm backend) and prepare shared-home state for persisted auth/config.
  • Add a cdx tmux launcher in both Bash and fish, mirroring the existing ccc workflow (persistent, reattachable session).
  • Update the claude alias to disable the built-in autoupdater so mise owns versioning.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
dot_config/fish/config.fish.tmpl Adds DISABLE_AUTOUPDATER=1 to claude alias and introduces cdx tmux launcher for fish.
dot_bash_aliases Adds DISABLE_AUTOUPDATER=1 to claude alias and introduces cdx tmux launcher for Bash.
.chezmoiscripts/run_onchange_after_install-codex.sh.tmpl Installs codex via mise and prepares shared-home .codex directory for persisted login state.

Comment thread .chezmoiscripts/run_onchange_after_install-codex.sh.tmpl Outdated
…drop ANTHROPIC_MODEL

- install-codex creates the ~/.codex → shared symlink itself (migrating any real
  dir) instead of relying on setup-shared-symlinks, which is run_onchange and
  won't re-run on an unchanged workspace upgrade (per Copilot review).
- drop ANTHROPIC_MODEL=claude-opus-4-7 from the fish claude alias (let Claude pick
  its current default).
@fx fx merged commit e54a3a3 into main May 31, 2026
3 checks passed
@fx fx deleted the add-codex-agent branch May 31, 2026 21:03
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.

2 participants