Codex CLI
Install, authenticate, and resume OpenAI's Codex CLI inside Daintree, including inline rendering and the $ picker for Codex Skills and Plugins.
Codex CLI
Codex CLI is OpenAI's CLI coding agent. It runs as a process in its own Daintree terminal panel with full PTY emulation, like every other built-in agent.
| Command | codex |
|---|---|
| Shortcut | Option-Command-X Control-Alt-X Control-Alt-X |
| Color | Green (#10a37f) |
| Bundled context estimate | 128,000 tokens |
| Default rendering | Inline, via --no-alt-screen |
| Permission bypass | --dangerously-bypass-approvals-and-sandbox (the global switch reaches it) |
| Resume | codex resume <session-id> -C ., falling back to codex resume --last |
| Platforms | macOS, Windows (or WSL), Linux |
Install & Authenticate
See OpenAI's current setup instructions for installation and sign-in.
OpenAI publishes an install script for each platform, a Homebrew cask, and an npm package. Daintree's install prompt offers npm, with the native curl installer also available on Linux through the Linux release update.
curl -fsSL https://chatgpt.com/codex/install.sh | sh Or brew install --cask codex, or npm install -g @openai/codex.
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex" Or npm install -g @openai/codex.
curl -fsSL https://chatgpt.com/codex/install.sh | sh Or npm install -g @openai/codex.
Run codex once and choose Sign in with ChatGPT, or run codex login from a shell (codex login --device-auth on a machine without a browser). To use an API key instead, pipe it in: printenv OPENAI_API_KEY | codex login --with-api-key. Codex caches the login in ~/.codex/auth.json (under CODEX_HOME if you set it) or in your OS credential store, depending on its cli_auth_credentials_store setting.
Daintree shows Codex as ready when it finds ~/.codex/auth.json or an OPENAI_API_KEY in its environment. A login kept only in the OS credential store leaves the badge on No credentials detected while Codex still launches and works.
Account quota
Settings > CLI agents > Codex has an Account quota section that Daintree reads from Codex itself for the signed-in account, not from any one terminal. Each limit window gets a row (for example 5-hour limit or Weekly limit) with the percentage used and when it resets, plus the time of the reading and your plan. Codex only reports a quota when you signed in with ChatGPT; with an API key the section reads Quota unavailable. View usage opens ChatGPT's usage page. An old reading or passed reset time is labeled Stale reading; Daintree keeps the reported percentage until Codex returns a new value.
How Daintree Launches It
Codex is one of the three agents that launch inline by default. Daintree passes --no-alt-screen, so Codex writes into Daintree's own scrollback instead of taking the alternate screen buffer, and output stays scrollable and selectable with the native selection layer. Turn on Use alt-screen mode globally, or flip the per-agent or per-preset override, and the flag is dropped.
Turning on permission bypass adds --dangerously-bypass-approvals-and-sandbox. Codex declares bypass support, so the global Skip permission prompts switch reaches it as well as the per-agent toggle.
Codex draws an animated particle field behind its prompt that repaints continuously even when the agent is idle. Daintree launches Codex with it off (-c tui.whimsy=false) on every spawn, restart and resume. To keep it, turn on Composer sparkles under Settings > CLI agents > Codex > Launching.
When Codex runs its own updater at startup and exits asking to be started again, Daintree relaunches it once into the conversation the pane was opened with, instead of leaving the pane at a shell.
Images you drop or paste onto a Codex terminal, or attach in the input bar, arrive as attachments: Daintree pastes each image on its own as its absolute path, which Codex shows as [Image #N]. Agents without that support get a text @path reference instead.
An MCP client that launches Codex through agent.launch with a systemPrompt gets it as a -c developer_instructions="…" override, which adds to Codex's built-in instructions. Daintree keeps it with the pane's launch flags so a resume carries it too. Daintree's bundled model list for Codex is GPT-6 Astra, GPT-6 Sol and GPT-6 Luna; an older Codex that doesn't know them is offered its own list instead.
The $ picker
Codex is the agent that puts capabilities behind a $ trigger, and Daintree's unified input completes them with a category badge on each row so a skill and a plugin are distinguishable at a glance:
- Skills: folders containing a
SKILL.md, read from Codex's bundled system skills andskillsfolder underCODEX_HOME(default~/.codex), your personal~/.agents/skills, and the project's.agents/skills.~/.agents/skillsdoesn't move withCODEX_HOME, and it wins a name clash with theCODEX_HOMEcopy. Symlinked skill folders are followed. - Plugins: the enabled plugin entries in
config.tomlintersected with the manifests cached underplugins/cache, so only plugins that are both enabled and installed are offered.
A skill and a plugin can share a name; the skill wins the label. Codex Apps are modeled in the same picker but not yet discovered, because they resolve server-side with no local manifest to read.
The / trigger completes Codex's built-in commands, including /goal, which is shared with Claude Code; Codex's own description covers its edit, pause, resume, and clear subcommands.
Daintree MCP servers
When the MCP server is on (Settings > MCP server) and the project's Agent integrations setting is Core or Full, or the project has turned on a plugin's agent tools, each new Codex launch gets those servers as -c mcp_servers.… overrides on the command line. Each bearer token travels in the terminal's environment and Codex reads it through bearer_token_env_var, so no token appears in the command. The overrides add to your own config.toml servers; nothing is written into your Codex configuration or the repository. See MCP Server for what each tool set can do.
Subagents
Child threads a Codex session spawns appear in the panel header as a count you can open and read. Daintree gets them over Codex's own app-server protocol rather than scraping the terminal or parsing rollout files: a short-lived codex app-server per lookup, restricted by a method allowlist to reads only, so nothing here can start a thread or mark a project trusted in your config.toml.
Codex is the provider that can say a child is Waiting for approval or Waiting for input, because the protocol reports it; it never says Done, because a thread it declined to load has no finish to observe. For a fresh Codex session, Daintree learns the ID during shutdown and matches the running terminal by folder plus liveness. Two unidentified live sessions in one worktree are ambiguous, so the list stays empty. A resumed pane already carrying an ID can use an exact match after Daintree verifies the thread's folder and activity. The full mechanism is on Subagents in the Header.
Resuming Sessions
Daintree captures Codex's session ID during graceful shutdown and resumes with codex resume <session-id> -C .. To quit, Daintree sends Ctrl+C, and a second press only if Codex displays its “again to quit” prompt. It does not type /quit, which can become a queued chat message during a busy turn.
If no ID is captured during shutdown, cold restore first asks Codex which conversation resume --last would select in that folder. When it resolves an exact ID, Daintree resumes that ID and records it on the pane immediately. A missing CLI, failed lookup or tied latest sessions leaves codex resume --last as the fallback. Sibling-pane ownership checks can withhold either resume path to avoid reopening the same conversation twice. If a fresh session starts instead, the restore banner offers Find session to choose another Codex conversation.
Codex keys its sessions by UUID rather than by path, so a conversation is resumable from any folder, and moving or renaming a project preserves it. The trailing -C . pins the resumed conversation to the directory the pane launches in; without it, a resume from another folder would stop on Codex's “Choose working directory” prompt. That is also what lets a Codex pane moved onto another worktree relaunch in its new checkout and carry on the same conversation. For the resume mechanics across all agents, see Session Resume.
codex isn't detected after install, confirm it's on your PATH (command -v codex on macOS/Linux, where.exe codex on Windows), then restart Daintree. See Agent Availability for the five detection states, and Presets for launch configurations.Integration reference
This guide describes Daintree's checked-in integration. Its agent definition records the launch command, install guidance, authentication probes, rendering capabilities, MCP wiring, and resume support. Authentication badges report local evidence; the CLI still owns sign-in and provider access. After changing an installation, use Re-check in Settings > CLI agents; restart Daintree if its inherited PATH has changed.