Codex CLI customization covers the terminal interface around an agent session: syntax themes, shell completion, the editor for long prompts and the slash commands that show and change the session’s model, permissions and status, as OpenAI documents them on its CLI customization page.
Applies to: Codex CLI, per OpenAI’s CLI customization and Codex CLI documentation. Last checked: October 24, 2026.
On this page
Choose a terminal theme
Run the theme picker inside an interactive Codex session:
/theme
According to the CLI customization docs, the terminal UI syntax-highlights fenced Markdown code blocks and file diffs, and /theme opens a picker that previews themes and saves your selection to tui.theme in $CODEX_HOME/config.toml.
To add a custom theme, OpenAI says to place a .tmTheme file in this folder and then select it from the theme picker:
$CODEX_HOME/themes
Add shell completions
Codex generates a completion script for Bash, the Z shell, Fish or PowerShell (CLI customization). The documented example for the Z shell:
codex completion zsh
OpenAI says to load the script from your shell configuration. For the Z shell, add:
eval "$(codex completion zsh)"
If the Z shell reports command not found: compdef, the docs say to initialize its completion system before loading the Codex completions:
autoload -Uz compinit && compinit
eval "$(codex completion zsh)"
Then restart the shell, type codex and press Tab to verify completion, as the same page describes.
Open an editor for long prompts
For longer prompts, press Ctrl+G in the composer. The CLI customization docs say this opens the editor configured by VISUAL, or EDITOR when VISUAL isn’t set. Saving and closing the editor returns the text to the composer before you send it.
Use slash commands to inspect the session
The Codex CLI page lists these commands on the start screen:
| Command | What OpenAI says it does |
|---|---|
/init | Create an AGENTS.md file with instructions for Codex |
/status | Show current session configuration |
/permissions | Choose what Codex is allowed to do |
/model | Choose what model and reasoning effort to use |
/review | Review any changes and find issues |
The same page says /permissions sets when Codex can edit files or run commands without asking and shows the active sandbox and writable roots, and that a review reports prioritized findings without modifying your working tree.
Project instructions in AGENTS.md are a separate layer from these terminal preferences. The CLAUDE.md vs AGENTS.md guide explains which instruction file each coding agent reads, and the Codex CLI on Windows guide covers native and WSL2 setups.
Where each setting lives
| Setting | Where it is stored or set |
|---|---|
| Syntax theme | tui.theme in $CODEX_HOME/config.toml |
| Custom themes | .tmTheme files in $CODEX_HOME/themes |
| Shell completion | Your shell configuration, loading codex completion <shell> |
| Long-prompt editor | The VISUAL or EDITOR environment variable |
All four rows come from OpenAI’s CLI customization page.





