Codex
OpenAI's Codex CLI, with session resume.
hive agents install codex Run it in a terminal, or find it in Hivemind under Settings ▸ Plugins.
Codex
Runs codex, the Codex command-line agent, in a Hivemind terminal tile.
Before you add it
Hivemind installs no code for it: it runs the codex command you install yourself. Get it from its install page, or run npm install -g @openai/codex.
What it can do in Hivemind
- Says when a turn ends, so another agent can hand it work and read its reply (
hive ctl read, workflows). - Picks up the newest session for its folder after a restart.
- Its permission prompts stay with you, even when another agent started it.
What it asks for
Hivemind shows this before it adds the agent.
- Reads {home}/.codex/sessions to find a session to resume
- Reports its status and approval prompts to Hivemind through its own hooks, which can also read and type into your other tiles
- Tells codex its hooks for Hivemind are trusted, so it does not ask about them; it still asks about any other hook
Launch options
Set them on its page in Settings ▸ Plugins, or with hive plugins set agent:codex <option> <value>.
| Option | How it is passed |
|---|---|
| Model | --model <value> |
| Approval | --ask-for-approval <value>; yolo: --dangerously-bypass-approvals-and-sandbox |
| Sandbox | --sandbox <value> |
Listed from agent.yaml in this folder; fix it by pull request.
On the canvas
- Resumes a session: yes
- Reports when a turn ends: yes
- Can be supervised by another agent: no
This adds Codex to Hivemind. Install codex itself too, if you don't have it.
Files
From dip497/hivemind-plugins at 60eafbb. Hivemind checks each file's checksum as it downloads, and stops if one changed.
agent.yamlfec2494052aehive-turn-end.cjs08df313a473eREADME.md871c75f0b311
agent.yaml
# Codex — built-in provider manifest.
# Authoring format for the def half. See packages/hive-agents/src/manifest.ts.
manifestVersion: 2
# Written for the app that hands codex its trust for our hooks (hooks.trust).
minAppVersion: '2026.10.2'
id: codex
label: Codex
bin: codex
enabled: true
caps:
promptDelivery: typed
turnSignal: true
resume: cwd
supervise: human
blockedDetection: true
icon:
viewBox: 0 0 24 24
attrs:
fill: currentColor
fillRule: evenodd
shapes:
- path:
d: M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346
2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655
5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183
5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199
1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924
5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0
01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958
0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129
0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848
0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446
6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z
# A message typed while it works is read after its next tool call, in that turn: codex 0.163.0
# shows "Messages to be submitted after next tool call".
steer: true
# An image whose path is pasted alone is attached: codex 0.163.0 shows "[Image #1]".
pastedImages: true
options:
- id: model
label: Model
flag: --model
- id: mode
label: Approval
flag: --ask-for-approval
default: on-request
values:
yolo:
- --dangerously-bypass-approvals-and-sandbox
- id: sandbox
label: Sandbox
flag: --sandbox
default: workspace-write
install:
url: https://developers.openai.com/codex/cli
command: "npm install -g @openai/codex"
detect:
# Only the live prompt area says what the agent is waiting for: its own streamed output
# quotes files and plans full of "do you want … yes", and a screen-wide match reads those
# as a question and notifies for each one.
scope:
kind: tail
n: 20
rules:
# What it is WAITING on is its own chooser or its own footer, on one line. Matching the
# words a question is made of ("do you want", "[y/n]", "yes") anywhere on the screen read
# the output it was streaming back as a question, over and over.
- when:
any:
- seq:
- any: ["\u203a", ">"]
- run: space
min: 1
- run: digit
min: 1
- lit: '.'
- run: space
min: 1
at: start
- line:
- contains: press enter to confirm or esc to cancel
- line:
- contains: enter to submit answer
- line:
- contains: allow command?
# Its hook review, which a first tile in a new profile always lands on.
- line:
- contains: hook needs review
- line:
- contains: hooks need review
then: blocked
- when:
helper: hasInterruptPattern
then: working
- when:
line:
- startsWith: •
- containsCS: Working (
then: working
default: idle
session:
resume:
args:
- resume
- '{id}'
find:
strategy: jsonl-header
root: '{home}/.codex/sessions'
cwdPath: payload.cwd
idPath: payload.id
require:
type: session_meta
# Codex runs a hook only once its user has trusted that exact command. The commands are the same
# in every tile (the tile is read from the spawn environment), and the document carries codex's
# trust for these hooks and no others, so it never asks about ours and still asks about any other.
hooks:
arg: -c
format: toml
stable: true
trust: codex
template: 'hooks={events}'
events:
SessionStart:
emit: session.started
timeout: 10
SessionEnd:
emit: session.ended
timeout: 3
UserPromptSubmit:
emit: turn.started
timeout: 10
Stop:
hook: turnEnd
timeout: 10
Interrupt:
emit: turn.ended
outcome: interrupted
timeout: 3
PermissionRequest:
emit: input.requested
kind: permission
timeout: 10
PostToolUse:
emit: input.resolved
timeout: 10
SubagentStart:
emit: subagent.started
timeout: 10
SubagentStop:
emit: subagent.stopped
timeout: 10
PreCompact:
emit: compacting.started
timeout: 10
PostCompact:
emit: compacting.ended
timeout: 10
assets:
- name: hive-turn-end.cjs
file: hive-turn-end.cjs
hook: turnEnd
produces: [turn.ended]
# A tile Hivemind starts must not open on Codex's own update prompt, where a message sent to the
# tile would answer it; the user updates Codex from a terminal instead.
launch:
hcp: true
args:
- -c
- check_for_update_on_startup=false
# Its fullscreen transcript takes the wheel for itself and then does nothing with it, so a
# tile cannot be scrolled at all. In scrollback mode the terminal keeps the wheel and the
# transcript lands in the tile's own scrollback. `/tui` switches it back.
- -c
- tui.fullscreen_transcript=false
commands:
builtIn:
- name: "permissions"
description: "Set what Codex can do without asking first"
- name: "ide"
description: "Include open files, current selection, and other IDE context"
- name: "keymap"
description: "Remap TUI keyboard shortcuts"
- name: "vim"
description: "Toggle Vim mode for the composer"
- name: "setup-default-sandbox"
description: "Set up the elevated agent sandbox (Windows only)"
- name: "agents"
description: "Open the agent command center"
- name: "subagents"
description: "Switch the active subagent thread"
- name: "apps"
description: "Browse apps (connectors) and insert them into your prompt"
- name: "plugins"
description: "Browse installed and discoverable plugins"
- name: "hooks"
description: "View and manage lifecycle hooks"
- name: "clear"
description: "Clear the terminal and start a fresh chat"
- name: "rename"
description: "Rename the current chat"
- name: "archive"
description: "Archive the current session"
- name: "delete"
description: "Permanently delete the current session"
- name: "compact"
description: "Summarize the visible chat to free tokens"
- name: "copy"
description: "Copy the latest completed Codex output"
- name: "diff"
description: "Show the Git diff, including files Git isn\u2019t tracking yet"
- name: "exit"
description: "Exit the CLI (same as /quit)"
- name: "experimental"
description: "Toggle experimental features"
- name: "approve"
description: "Approve one retry of a recent auto review denial"
- name: "memories"
description: "Configure memory use and generation"
- name: "skills"
description: "Browse and use skills"
- name: "import"
description: "Import Claude Code or Cursor setup, projects, and chats"
- name: "feedback"
description: "Send logs to the Codex maintainers"
- name: "init"
description: "Generate an AGENTS.md scaffold in the current directory"
- name: "logout"
description: "Sign out of Codex"
- name: "mcp"
description: "List configured Model Context Protocol (MCP) tools"
- name: "mention"
description: "Attach a file to the chat"
- name: "model"
description: "Choose the active model (and reasoning effort, when available)"
- name: "fast"
description: "Toggle a Fast service tier when the model catalog exposes one"
- name: "plan"
description: "Switch to plan mode and optionally send a prompt"
- name: "goal"
description: "Set, edit, pause, resume, view, or clear a task goal"
- name: "ps"
description: "Show background terminals and their recent output"
- name: "stop"
description: "Stop all background terminals"
- name: "fork"
description: "Fork the current chat into a new chat"
- name: "side"
description: "Start an ephemeral side chat"
- name: "raw"
description: "Toggle raw scrollback mode"
- name: "resume"
description: "Resume a saved chat from your session list"
- name: "new"
description: "Start a new chat inside the same CLI session"
- name: "quit"
description: "Exit the CLI"
- name: "review"
description: "Ask Codex to review your working tree"
- name: "status"
description: "Display session configuration and token usage"
- name: "usage"
description: "View account token usage or use a rate-limit reset"
- name: "debug-config"
description: "Print config layer and requirements diagnostics"
- name: "statusline"
description: "Configure TUI status-line fields interactively"
- name: "title"
description: "Configure terminal window or tab title fields interactively"
- name: "theme"
description: "Choose a syntax-highlighting theme"
- name: "pets"
description: "Choose or hide a terminal pet"
- name: "tui"
description: "Choose the terminal mode for the next launch"
- name: "export"
description: "Export the conversation as Markdown"
- name: "recap"
description: "Generate a summary of the current conversation"
- name: "cd"
description: "Change the session\u2019s working directory"
- name: "pwd"
description: "Show the working directory"
- name: "worktree"
description: "Start or continue a chat in a managed Git worktree"
- name: "daemon"
description: "Open background server controls"
- name: "warnings"
description: "View retained warnings and diagnostics"
folders:
- path: "{home}/.codex/prompts"
prefix: "prompts:"
Hivemind shows you this list and asks before it installs.
- reads {home}/.codex/sessions to find a session to resume
- reports its status and approval prompts to Hivemind through its own hooks, which can also read and type into your other tiles
- tells codex its hooks for Hivemind are trusted, so it does not ask about them; it still asks about any other hook
| Version | Commit | Listed |
|---|---|---|
| 1.0.0 | 60eafbb | October 28, 2026 |
Needs Hivemind 2026.10.2 or newer.
HiveHub keeps the version listed last. The ones before it are in the repository's history.
Something wrong with it? Report it.