OpenAI Codex as a chat agent: models and effort from the Codex CLI, sandbox modes, /review, /init, /mcp and your own prompts, session fork, export and delete, context meter, profiles and quick actions. Ships executable code.
Install in Lumen: add the server, then pick ChatGPT Codex from the list.
http://localhost:8730
OpenAI Codex as a chat agent in Lumen. Each message starts the installed Codex CLI (codex exec); your login, AGENTS.md and ~/.codex/config.toml apply.
when enabled — Full access
open, MCP calls (server.tool with their arguments and result), web searches
token_count records, else the model cache) and rate limits when your plan reports them; Codex prints no prices, so there is no cost estimate
Codex prints, switched-off reasoning summaries, ephemeral sessions
~/.codex/sessions,named as Codex or you named them)
~/.codex/models_cache.json or from codex app-server(model/list) — ↻ next to the picker asks the CLI again
supports; Lumen remembers the choice per model
@ for files, send the open file and selection along
| Command | What it does | | --- | --- | | /review [base <branch> \| commit <sha> [title] \| instructions] | codex exec review: uncommitted changes by default. Codex accepts either a target or custom instructions, not both. A review runs in a session of its own. | | /init | Asks Codex to create or improve AGENTS.md | | /status | Codex version, account, model, sandbox, approvals, profile, AGENTS.md, session | | /mcp [list \| get \| add \| remove] | codex mcp …; add takes codex mcp add's arguments, e.g. /mcp add docs --url https://… or /mcp add tool -- npx -y some-server | | /profiles | The profiles Codex finds ([profiles.x] in config.toml, <name>.config.toml) | | /prompts:<name> [args] | Your Codex custom prompts: ~/.codex/prompts/.md, and .codex/prompts/.md of the project (a project prompt wins). Front matter description and argument-hint; body placeholders $1…$9, $ARGUMENTS, $NAME (filled from NAME=value), $$ | | your own | Customize → Slash commands (e.g. /explain, /tests) |
Lumen adds /clear, /new and — for the session actions below — /fork, /rename, /delete, /export. The palette learns Codex's own commands when the chat's first session starts.
codex exec fork <id>: a new session with the old historycodex delete --force <id>Not offered: compact (exec mode has no compaction command; Codex compacts by itself near the context limit) and rewind (no checkpoints in exec mode).
Settings → Extensions → ChatGPT Codex:
codex, profile ([profiles.x] or <x>.config.toml)max),reasoning summary, verbosity, hide reasoning
developer_instructions (-c) or in front of each message; the chat's own system prompt is added after it
/tmp in the In project sandboxmore writable folders (--add-dir); Git check
-c overrides (comments allowed, bad lines reported), replyschema (--output-schema), feature flags (--enable / --disable), local model (--oss, --local-provider), ephemeral sessions (--ephemeral), environment variables
entries (pre-filled; edit freely)
Quick action Label | prompt ({{selection}} {{file}} {{clipboard}})
Command name | description | prompt ($ARGUMENTS or {{args}})
Profile Label | mode=read-only | effort=high | anySettingKey=value
Built in: the profiles Careful (read only, high effort) and Build. Full access in a profile still needs the setting that allows it.
Every message runs with --color never. Exec mode has no --search flag, so web search is the web_search config key.
ChatGPT Codex — detected by AGENTS.md or .codex/, with thetasks Start Codex, Resume last session, Sign in, Show MCP servers and Install Codex
AGENTS.md with commands and conventions, an example prompt in .codex/prompts/ and a project .codex/config.toml
npm install -g @openai/codex
codex login
The extension ships executable code that must be confirmed on installation. It only starts the program you have installed.
codexPath — Path to codexprofile — Profile from config.tomlmodel — Default modelmodelSource — Model list fromshowLegacyModels — Offer older and hidden modelsmodelCacheMinutes — CLI-Cache model list (minutes)extraModels — More modelsreasoningEffort — Default reasoning effortreasoningSummary — Reasoning summaryverbosity — Answer verbosityhideReasoning — Hide reasoningcustomInstructions — Instructions for every chatinstructionsVia — Hand instructions to CodexwebSearch — Web searchnetworkAccess — Network in "In project" sandbox modeexcludeTmp — Keep /tmp and $TMPDIR out of the writable rootsapprovalPolicy — Approval policy (all modes)approvalReadOnly — Approvals in "Read only"approvalWorkspace — Approvals in "In project"approvalFull — Approvals in "Full access"allowFullAccess — Allow "Full access" modeadditionalDirectories — More writable foldersskipGitRepoCheck — Also work outside Git repositoriesconfigOverrides — More configuration (-c)env — Environment variablesephemeral — Ephemeral sessionsoutputSchema — Reply schema (--output-schema)features — Feature flagsoss — Use a local model (--oss)localProvider — Local providerquickActionsText — Quick actionscustomCommandsText — Slash commandsprofilesText — Profiles