cli/reference.md +935 −1510
1# Command line options1# Command line options
2 2
33## How to read this referenceexport const globalFlagOptions = [
44 {
55This page catalogs every documented Codex CLI command and flag. Use the interactive tables to search by key or description. Each section indicates whether the option is stable or experimental and calls out risky combinations. key: "PROMPT",
66 type: "string",
77The CLI inherits most defaults from <code>~/.codex/config.toml</code>. Any description:
88 <code>-c key=value</code> overrides you pass at the command line take "Optional text instruction to start the session. Omit to launch the TUI without a pre-filled message.",
99 precedence for that invocation. See [Config },
1010 basics](https://developers.openai.com/codex/config-basic#configuration-precedence) for more information. {
1111 key: "--image, -i",
1212## Global flags type: "path[,path...]",
1313 description:
1414| Key | Type / Values | Details | "Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag.",
1515| --- | --- | --- | },
1616| `--add-dir` | `path` | Grant additional directories write access alongside the main workspace. Repeat for multiple paths. | {
1717| `--ask-for-approval, -a` | `untrusted | on-request | never` | Control when Codex pauses for human approval before running a command. `on-failure` is deprecated; prefer `on-request` for interactive runs or `never` for non-interactive runs. | key: "--model, -m",
1818| `--cd, -C` | `path` | Set the working directory for the agent before it starts processing your request. | type: "string",
1919| `--config, -c` | `key=value` | Override configuration values. Values parse as JSON if possible; otherwise the literal string is used. | description:
2020| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Run every command without approvals or sandboxing. Only use inside an externally hardened environment. | "Override the model set in configuration (for example `gpt-5.4`).",
2121| `--disable` | `feature` | Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable. | },
2222| `--enable` | `feature` | Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable. | {
2323| `--full-auto` | `boolean` | Shortcut for low-friction local work: sets `--ask-for-approval on-request` and `--sandbox workspace-write`. | key: "--oss",
2424| `--image, -i` | `path[,path...]` | Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag. | type: "boolean",
2525| `--model, -m` | `string` | Override the model set in configuration (for example `gpt-5.4`). | defaultValue: "false",
2626| `--no-alt-screen` | `boolean` | Disable alternate screen mode for the TUI (overrides `tui.alternate_screen` for this run). | description:
2727| `--oss` | `boolean` | Use the local open source model provider (equivalent to `-c model_provider="oss"`). Validates that Ollama is running. | 'Use the local open source model provider (equivalent to `-c model_provider="oss"`). Validates that Ollama is running.',
2828| `--profile, -p` | `string` | Configuration profile name to load from `~/.codex/config.toml`. | },
2929| `--remote` | `ws://host:port | wss://host:port` | Connect the interactive TUI to a remote app-server WebSocket endpoint. Supported for `codex`, `codex resume`, and `codex fork`; other subcommands reject remote mode. | {
3030| `--remote-auth-token-env` | `ENV_VAR` | Read a bearer token from this environment variable and send it when connecting with `--remote`. Requires `--remote`; tokens are only sent over `wss://` URLs or `ws://` URLs whose host is `localhost`, `127.0.0.1`, or `::1`. | key: "--profile, -p",
3131| `--sandbox, -s` | `read-only | workspace-write | danger-full-access` | Select the sandbox policy for model-generated shell commands. | type: "string",
3232| `--search` | `boolean` | Enable live web search (sets `web_search = "live"` instead of the default `"cached"`). | description:
3333| `PROMPT` | `string` | Optional text instruction to start the session. Omit to launch the TUI without a pre-filled message. | "Configuration profile name to load from `~/.codex/config.toml`.",
3434 },
3535Key {
3636 key: "--sandbox, -s",
3737`--add-dir` type: "read-only | workspace-write | danger-full-access",
3838 description:
3939Type / Values "Select the sandbox policy for model-generated shell commands.",
4040 },
4141`path` {
4242 key: "--ask-for-approval, -a",
4343Details type: "untrusted | on-request | never",
4444 description:
4545Grant additional directories write access alongside the main workspace. Repeat for multiple paths. "Control when Codex pauses for human approval before running a command. `on-failure` is deprecated; prefer `on-request` for interactive runs or `never` for non-interactive runs.",
4646 },
4747Key {
4848 key: "--dangerously-bypass-approvals-and-sandbox, --yolo",
4949`--ask-for-approval, -a` type: "boolean",
5050 defaultValue: "false",
5151Type / Values description:
5252 "Run every command without approvals or sandboxing. Only use inside an externally hardened environment.",
5353`untrusted | on-request | never` },
5454 {
5555Details key: "--cd, -C",
5656 type: "path",
5757Control when Codex pauses for human approval before running a command. `on-failure` is deprecated; prefer `on-request` for interactive runs or `never` for non-interactive runs. description:
5858 "Set the working directory for the agent before it starts processing your request.",
5959Key },
6060 {
6161`--cd, -C` key: "--search",
6262 type: "boolean",
6363Type / Values defaultValue: "false",
6464 description:
6565`path` 'Enable live web search (sets `web_search = "live"` instead of the default `"cached"`).',
6666 },
6767Details {
6868 key: "--add-dir",
6969Set the working directory for the agent before it starts processing your request. type: "path",
7070 description:
7171Key "Grant additional directories write access alongside the main workspace. Repeat for multiple paths.",
7272 },
7373`--config, -c` {
7474 key: "--no-alt-screen",
7575Type / Values type: "boolean",
7676 defaultValue: "false",
7777`key=value` description:
7878 "Disable alternate screen mode for the TUI (overrides `tui.alternate_screen` for this run).",
7979Details },
8080 {
8181Override configuration values. Values parse as JSON if possible; otherwise the literal string is used. key: "--remote",
8282 type: "ws://host:port | wss://host:port",
8383Key description:
8484 "Connect the interactive TUI to a remote app-server WebSocket endpoint. Supported for `codex`, `codex resume`, and `codex fork`; other subcommands reject remote mode.",
8585`--dangerously-bypass-approvals-and-sandbox, --yolo` },
8686 {
8787Type / Values key: "--remote-auth-token-env",
8888 type: "ENV_VAR",
8989`boolean` description:
9090 "Read a bearer token from this environment variable and send it when connecting with `--remote`. Requires `--remote`; tokens are only sent over `wss://` URLs or `ws://` URLs whose host is `localhost`, `127.0.0.1`, or `::1`.",
9191Details },
9292 {
9393Run every command without approvals or sandboxing. Only use inside an externally hardened environment. key: "--enable",
9494 type: "feature",
9595Key description:
9696 "Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable.",
9797`--disable` },
9898 {
9999Type / Values key: "--disable",
100100 type: "feature",
101101`feature` description:
102102 "Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable.",
103103Details },
104104 {
105105Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable. key: "--config, -c",
106106 type: "key=value",
107107Key description:
108108 "Override configuration values. Values parse as JSON if possible; otherwise the literal string is used.",
109109`--enable` },
110110 ];
111111Type / Values
112112 export const commandOverview = [
113113`feature` {
114114 key: "codex",
115115Details href: "/codex/cli/reference#codex-interactive",
116116 type: "stable",
117117Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable. description:
118118 "Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments.",
119119Key },
120120 {
121121`--full-auto` key: "codex app-server",
122122 href: "/codex/cli/reference#codex-app-server",
123123Type / Values type: "experimental",
124124 description:
125125`boolean` "Launch the Codex app server for local development or debugging.",
126126 },
127127Details {
128128 key: "codex app",
129129Shortcut for low-friction local work: sets `--ask-for-approval on-request` and `--sandbox workspace-write`. href: "/codex/cli/reference#codex-app",
130130 type: "stable",
131131Key description:
132132 "Launch the Codex desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open.",
133133`--image, -i` },
134134 {
135135Type / Values key: "codex debug app-server send-message-v2",
136136 href: "/codex/cli/reference#codex-debug-app-server-send-message-v2",
137137`path[,path...]` type: "experimental",
138138 description:
139139Details "Debug app-server by sending a single V2 message through the built-in test client.",
140140 },
141141Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag. {
142142 key: "codex debug models",
143143Key href: "/codex/cli/reference#codex-debug-models",
144144 type: "experimental",
145145`--model, -m` description:
146146 "Print the raw model catalog Codex sees, including an option to inspect only the bundled catalog.",
147147Type / Values },
148148 {
149149`string` key: "codex apply",
150150 href: "/codex/cli/reference#codex-apply",
151151Details type: "stable",
152152 description:
153153Override the model set in configuration (for example `gpt-5.4`). "Apply the latest diff generated by a Codex Cloud task to your local working tree. Alias: `codex a`.",
154154 },
155155Key {
156156 key: "codex cloud",
157157`--no-alt-screen` href: "/codex/cli/reference#codex-cloud",
158158 type: "experimental",
159159Type / Values description:
160160 "Browse or execute Codex Cloud tasks from the terminal without opening the TUI. Alias: `codex cloud-tasks`.",
161161`boolean` },
162162 {
163163Details key: "codex completion",
164164 href: "/codex/cli/reference#codex-completion",
165165Disable alternate screen mode for the TUI (overrides `tui.alternate_screen` for this run). type: "stable",
166166 description:
167167Key "Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell.",
168168 },
169169`--oss` {
170170 key: "codex features",
171171Type / Values href: "/codex/cli/reference#codex-features",
172172 type: "stable",
173173`boolean` description:
174174 "List feature flags and persistently enable or disable them in `config.toml`.",
175175Details },
176176 {
177177Use the local open source model provider (equivalent to `-c model_provider="oss"`). Validates that Ollama is running. key: "codex exec",
178178 href: "/codex/cli/reference#codex-exec",
179179Key type: "stable",
180180 description:
181181`--profile, -p` "Run Codex non-interactively. Alias: `codex e`. Stream results to stdout or JSONL and optionally resume previous sessions.",
182182 },
183183Type / Values {
184184 key: "codex execpolicy",
185185`string` href: "/codex/cli/reference#codex-execpolicy",
186186 type: "experimental",
187187Details description:
188188 "Evaluate execpolicy rule files and see whether a command would be allowed, prompted, or blocked.",
189189Configuration profile name to load from `~/.codex/config.toml`. },
190190 {
191191Key key: "codex login",
192192 href: "/codex/cli/reference#codex-login",
193193`--remote` type: "stable",
194194 description:
195195Type / Values "Authenticate Codex using ChatGPT OAuth, device auth, or an API key piped over stdin.",
196196 },
197197`ws://host:port | wss://host:port` {
198198 key: "codex logout",
199199Details href: "/codex/cli/reference#codex-logout",
200200 type: "stable",
201201Connect the interactive TUI to a remote app-server WebSocket endpoint. Supported for `codex`, `codex resume`, and `codex fork`; other subcommands reject remote mode. description: "Remove stored authentication credentials.",
202202 },
203203Key {
204204 key: "codex mcp",
205205`--remote-auth-token-env` href: "/codex/cli/reference#codex-mcp",
206206 type: "experimental",
207207Type / Values description:
208208 "Manage Model Context Protocol servers (list, add, remove, authenticate).",
209209`ENV_VAR` },
210210 {
211211Details key: "codex plugin marketplace",
212212 href: "/codex/cli/reference#codex-plugin-marketplace",
213213Read a bearer token from this environment variable and send it when connecting with `--remote`. Requires `--remote`; tokens are only sent over `wss://` URLs or `ws://` URLs whose host is `localhost`, `127.0.0.1`, or `::1`. type: "experimental",
214214 description:
215215Key "Add, upgrade, or remove plugin marketplaces from Git or local sources.",
216216 },
217217`--sandbox, -s` {
218218 key: "codex mcp-server",
219219Type / Values href: "/codex/cli/reference#codex-mcp-server",
220220 type: "experimental",
221221`read-only | workspace-write | danger-full-access` description:
222222 "Run Codex itself as an MCP server over stdio. Useful when another agent consumes Codex.",
223223Details },
224224 {
225225Select the sandbox policy for model-generated shell commands. key: "codex resume",
226226 href: "/codex/cli/reference#codex-resume",
227227Key type: "stable",
228228 description:
229229`--search` "Continue a previous interactive session by ID or resume the most recent conversation.",
230230 },
231231Type / Values {
232232 key: "codex fork",
233233`boolean` href: "/codex/cli/reference#codex-fork",
234234 type: "stable",
235235Details description:
236236 "Fork a previous interactive session into a new thread, preserving the original transcript.",
237237Enable live web search (sets `web_search = "live"` instead of the default `"cached"`). },
238238 {
239239Key key: "codex sandbox",
240240 href: "/codex/cli/reference#codex-sandbox",
241241`PROMPT` type: "experimental",
242242 description:
243243Type / Values "Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes.",
244244 },
245245`string` {
246246 key: "codex update",
247247Details href: "/codex/cli/reference#codex-update",
248248 type: "stable",
249249Optional text instruction to start the session. Omit to launch the TUI without a pre-filled message. description:
250250 "Check for and apply a Codex CLI update when the installed release supports self-update.",
251251Expand to view all },
252252 ];
253253These options apply to the base `codex` command and propagate to each subcommand unless a section below specifies otherwise.
254254When you run a subcommand, place global flags after it (for example, `codex exec --oss ...`) so Codex applies them as intended.export const execOptions = [
255255 {
256256## Command overview key: "PROMPT",
257257 type: "string | - (read stdin)",
258258The Maturity column uses feature maturity labels such as Experimental, Beta, description:
259259 and Stable. See [Feature Maturity](https://developers.openai.com/codex/feature-maturity) for how to "Initial instruction for the task. Use `-` to pipe the prompt from stdin.",
260260 interpret these labels. },
261261 {
262262| Key | Maturity | Details | key: "--image, -i",
263263| --- | --- | --- | type: "path[,path...]",
264264| [`codex`](https://developers.openai.com/codex/cli/reference#codex-interactive) | Stable | Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments. | description:
265265| [`codex app`](https://developers.openai.com/codex/cli/reference#codex-app) | Stable | Launch the Codex desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open. | "Attach images to the first message. Repeatable; supports comma-separated lists.",
266266| [`codex app-server`](https://developers.openai.com/codex/cli/reference#codex-app-server) | Experimental | Launch the Codex app server for local development or debugging. | },
267267| [`codex apply`](https://developers.openai.com/codex/cli/reference#codex-apply) | Stable | Apply the latest diff generated by a Codex Cloud task to your local working tree. Alias: `codex a`. | {
268268| [`codex cloud`](https://developers.openai.com/codex/cli/reference#codex-cloud) | Experimental | Browse or execute Codex Cloud tasks from the terminal without opening the TUI. Alias: `codex cloud-tasks`. | key: "--model, -m",
269269| [`codex completion`](https://developers.openai.com/codex/cli/reference#codex-completion) | Stable | Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell. | type: "string",
270270| [`codex debug app-server send-message-v2`](https://developers.openai.com/codex/cli/reference#codex-debug-app-server-send-message-v2) | Experimental | Debug app-server by sending a single V2 message through the built-in test client. | description: "Override the configured model for this run.",
271271| [`codex exec`](https://developers.openai.com/codex/cli/reference#codex-exec) | Stable | Run Codex non-interactively. Alias: `codex e`. Stream results to stdout or JSONL and optionally resume previous sessions. | },
272272| [`codex execpolicy`](https://developers.openai.com/codex/cli/reference#codex-execpolicy) | Experimental | Evaluate execpolicy rule files and see whether a command would be allowed, prompted, or blocked. | {
273273| [`codex features`](https://developers.openai.com/codex/cli/reference#codex-features) | Stable | List feature flags and persistently enable or disable them in `config.toml`. | key: "--oss",
274274| [`codex fork`](https://developers.openai.com/codex/cli/reference#codex-fork) | Stable | Fork a previous interactive session into a new thread, preserving the original transcript. | type: "boolean",
275275| [`codex login`](https://developers.openai.com/codex/cli/reference#codex-login) | Stable | Authenticate Codex using ChatGPT OAuth, device auth, or an API key piped over stdin. | defaultValue: "false",
276276| [`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout) | Stable | Remove stored authentication credentials. | description:
277277| [`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp) | Experimental | Manage Model Context Protocol servers (list, add, remove, authenticate). | "Use the local open source provider (requires a running Ollama instance).",
278278| [`codex mcp-server`](https://developers.openai.com/codex/cli/reference#codex-mcp-server) | Experimental | Run Codex itself as an MCP server over stdio. Useful when another agent consumes Codex. | },
279279| [`codex plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace) | Experimental | Add, upgrade, or remove plugin marketplaces from Git or local sources. | {
280280| [`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume) | Stable | Continue a previous interactive session by ID or resume the most recent conversation. | key: "--sandbox, -s",
281281| [`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox) | Experimental | Run arbitrary commands inside Codex-provided macOS seatbelt or Linux bubblewrap sandboxes. | type: "read-only | workspace-write | danger-full-access",
282282 description:
283283Key "Sandbox policy for model-generated commands. Defaults to configuration.",
284284 },
285285[`codex`](https://developers.openai.com/codex/cli/reference#codex-interactive) {
286286 key: "--profile, -p",
287287Maturity type: "string",
288288 description: "Select a configuration profile defined in config.toml.",
289289Stable },
290290 {
291291Details key: "--full-auto",
292292 type: "boolean",
293293Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments. defaultValue: "false",
294294 description:
295295Key "Deprecated compatibility flag. Prefer `--sandbox workspace-write`; Codex prints a warning when this flag is used.",
296296 },
297297[`codex app`](https://developers.openai.com/codex/cli/reference#codex-app) {
298298 key: "--dangerously-bypass-approvals-and-sandbox, --yolo",
299299Maturity type: "boolean",
300300 defaultValue: "false",
301301Stable description:
302302 "Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner.",
303303Details },
304304 {
305305Launch the Codex desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open. key: "--cd, -C",
306306 type: "path",
307307Key description: "Set the workspace root before executing the task.",
308308 },
309309[`codex app-server`](https://developers.openai.com/codex/cli/reference#codex-app-server) {
310310 key: "--skip-git-repo-check",
311311Maturity type: "boolean",
312312 defaultValue: "false",
313313Experimental description:
314314 "Allow running outside a Git repository (useful for one-off directories).",
315315Details },
316316 {
317317Launch the Codex app server for local development or debugging. key: "--ephemeral",
318318 type: "boolean",
319319Key defaultValue: "false",
320320 description: "Run without persisting session rollout files to disk.",
321321[`codex apply`](https://developers.openai.com/codex/cli/reference#codex-apply) },
322322 {
323323Maturity key: "--ignore-user-config",
324324 type: "boolean",
325325Stable defaultValue: "false",
326326 description:
327327Details "Do not load `$CODEX_HOME/config.toml`. Authentication still uses `CODEX_HOME`.",
328328 },
329329Apply the latest diff generated by a Codex Cloud task to your local working tree. Alias: `codex a`. {
330330 key: "--ignore-rules",
331331Key type: "boolean",
332332 defaultValue: "false",
333333[`codex cloud`](https://developers.openai.com/codex/cli/reference#codex-cloud) description:
334334 "Do not load user or project execpolicy `.rules` files for this run.",
335335Maturity },
336336 {
337337Experimental key: "--output-schema",
338338 type: "path",
339339Details description:
340340 "JSON Schema file describing the expected final response shape. Codex validates tool output against it.",
341341Browse or execute Codex Cloud tasks from the terminal without opening the TUI. Alias: `codex cloud-tasks`. },
342342 {
343343Key key: "--color",
344344 type: "always | never | auto",
345345[`codex completion`](https://developers.openai.com/codex/cli/reference#codex-completion) defaultValue: "auto",
346346 description: "Control ANSI color in stdout.",
347347Maturity },
348348 {
349349Stable key: "--json, --experimental-json",
350350 type: "boolean",
351351Details defaultValue: "false",
352352 description:
353353Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell. "Print newline-delimited JSON events instead of formatted text.",
354354 },
355355Key {
356356 key: "--output-last-message, -o",
357357[`codex debug app-server send-message-v2`](https://developers.openai.com/codex/cli/reference#codex-debug-app-server-send-message-v2) type: "path",
358358 description:
359359Maturity "Write the assistant’s final message to a file. Useful for downstream scripting.",
360360 },
361361Experimental {
362362 key: "Resume subcommand",
363363Details type: "codex exec resume [SESSION_ID]",
364364 description:
365365Debug app-server by sending a single V2 message through the built-in test client. "Resume an exec session by ID or add `--last` to continue the most recent session from the current working directory. Add `--all` to consider sessions from any directory. Accepts an optional follow-up prompt.",
366366 },
367367Key {
368368 key: "-c, --config",
369369[`codex exec`](https://developers.openai.com/codex/cli/reference#codex-exec) type: "key=value",
370370 description:
371371Maturity "Inline configuration override for the non-interactive run (repeatable).",
372372 },
373373Stable];
374374
375375Detailsexport const appServerOptions = [
376376 {
377377Run Codex non-interactively. Alias: `codex e`. Stream results to stdout or JSONL and optionally resume previous sessions. key: "--listen",
378378 type: "stdio:// | ws://IP:PORT",
379379Key defaultValue: "stdio://",
380380 description:
381381[`codex execpolicy`](https://developers.openai.com/codex/cli/reference#codex-execpolicy) "Transport listener URL. Use `ws://IP:PORT` to expose a WebSocket endpoint for remote clients.",
382382 },
383383Maturity {
384384 key: "--ws-auth",
385385Experimental type: "capability-token | signed-bearer-token",
386386 description:
387387Details "Authentication mode for app-server WebSocket clients. If omitted, WebSocket auth is disabled; non-local listeners warn during startup.",
388388 },
389389Evaluate execpolicy rule files and see whether a command would be allowed, prompted, or blocked. {
390390 key: "--ws-token-file",
391391Key type: "absolute path",
392392 description:
393393[`codex features`](https://developers.openai.com/codex/cli/reference#codex-features) "File containing the shared capability token. Required with `--ws-auth capability-token`.",
394394 },
395395Maturity {
396396 key: "--ws-shared-secret-file",
397397Stable type: "absolute path",
398398 description:
399399Details "File containing the HMAC shared secret used to validate signed JWT bearer tokens. Required with `--ws-auth signed-bearer-token`.",
400400 },
401401List feature flags and persistently enable or disable them in `config.toml`. {
402402 key: "--ws-issuer",
403403Key type: "string",
404404 description:
405405[`codex fork`](https://developers.openai.com/codex/cli/reference#codex-fork) "Expected `iss` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`.",
406406 },
407407Maturity {
408408 key: "--ws-audience",
409409Stable type: "string",
410410 description:
411411Details "Expected `aud` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`.",
412412 },
413413Fork a previous interactive session into a new thread, preserving the original transcript. {
414414 key: "--ws-max-clock-skew-seconds",
415415Key type: "number",
416416 defaultValue: "30",
417417[`codex login`](https://developers.openai.com/codex/cli/reference#codex-login) description:
418418 "Clock skew allowance when validating signed bearer token `exp` and `nbf` claims. Requires `--ws-auth signed-bearer-token`.",
419419Maturity },
420420 ];
421421Stable
422422 export const appOptions = [
423423Details {
424424 key: "PATH",
425425Authenticate Codex using ChatGPT OAuth, device auth, or an API key piped over stdin. type: "path",
426426 defaultValue: ".",
427427Key description:
428428 "Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path.",
429429[`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout) },
430430 {
431431Maturity key: "--download-url",
432432 type: "url",
433433Stable description:
434434 "Advanced override for the Codex desktop installer URL used during install.",
435435Details },
436436 ];
437437Remove stored authentication credentials.
438438 export const debugAppServerSendMessageV2Options = [
439439Key {
440440 key: "USER_MESSAGE",
441441[`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp) type: "string",
442442 description:
443443Maturity "Message text sent to app-server through the built-in V2 test-client flow.",
444444 },
445445Experimental];
446446
447447Detailsexport const debugModelsOptions = [
448448 {
449449Manage Model Context Protocol servers (list, add, remove, authenticate). key: "--bundled",
450450 type: "boolean",
451451Key defaultValue: "false",
452452 description:
453453[`codex mcp-server`](https://developers.openai.com/codex/cli/reference#codex-mcp-server) "Skip refresh and print only the model catalog bundled with the current Codex binary.",
454454 },
455455Maturity];
456456
457457Experimentalexport const resumeOptions = [
458458 {
459459Details key: "SESSION_ID",
460460 type: "uuid",
461461Run Codex itself as an MCP server over stdio. Useful when another agent consumes Codex. description:
462462 "Resume the specified session. Omit and use `--last` to continue the most recent session.",
463463Key },
464464 {
465465[`codex plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace) key: "--last",
466466 type: "boolean",
467467Maturity defaultValue: "false",
468468 description:
469469Experimental "Skip the picker and resume the most recent conversation from the current working directory.",
470470 },
471471Details {
472472 key: "--all",
473473Add, upgrade, or remove plugin marketplaces from Git or local sources. type: "boolean",
474474 defaultValue: "false",
475475Key description:
476476 "Include sessions outside the current working directory when selecting the most recent session.",
477477[`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume) },
478478 ];
479479Maturity
480480 export const featuresOptions = [
481481Stable {
482482 key: "List subcommand",
483483Details type: "codex features list",
484484 description:
485485Continue a previous interactive session by ID or resume the most recent conversation. "Show known feature flags, their maturity stage, and their effective state.",
486486 },
487487Key {
488488 key: "Enable subcommand",
489489[`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox) type: "codex features enable <feature>",
490490 description:
491491Maturity "Persistently enable a feature flag in `config.toml`. Respects the active `--profile` when provided.",
492492 },
493493Experimental {
494494 key: "Disable subcommand",
495495Details type: "codex features disable <feature>",
496496 description:
497497Run arbitrary commands inside Codex-provided macOS seatbelt or Linux bubblewrap sandboxes. "Persistently disable a feature flag in `config.toml`. Respects the active `--profile` when provided.",
498498 },
499499Expand to view all];
500500
501501## Command detailsexport const execResumeOptions = [
502502 {
503503### `codex` (interactive) key: "SESSION_ID",
504504 type: "uuid",
505505Running `codex` with no subcommand launches the interactive terminal UI (TUI). The agent accepts the global flags above plus image attachments. Web search defaults to cached mode; use `--search` to switch to live browsing and `--full-auto` to let Codex run most commands without prompts. description:
506506 "Resume the specified session. Omit and use `--last` to continue the most recent session.",
507507Use `--remote ws://host:port` or `--remote wss://host:port` to connect the TUI to an app server started with `codex app-server --listen ws://IP:PORT`. Add `--remote-auth-token-env <ENV_VAR>` when the server requires a bearer token for WebSocket authentication. See [Codex CLI features](https://developers.openai.com/codex/cli/features#connect-the-tui-to-a-remote-app-server) for setup examples and authentication guidance. },
508508 {
509509### `codex app-server` key: "--last",
510510 type: "boolean",
511511Launch the Codex app server locally. This is primarily for development and debugging and may change without notice. defaultValue: "false",
512512 description:
513513| Key | Type / Values | Details | "Resume the most recent conversation from the current working directory.",
514514| --- | --- | --- | },
515515| `--listen` | `stdio:// | ws://IP:PORT` | Transport listener URL. Use `ws://IP:PORT` to expose a WebSocket endpoint for remote clients. | {
516516| `--ws-audience` | `string` | Expected `aud` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`. | key: "--all",
517517| `--ws-auth` | `capability-token | signed-bearer-token` | Authentication mode for app-server WebSocket clients. If omitted, WebSocket auth is disabled; non-local listeners warn during startup. | type: "boolean",
518518| `--ws-issuer` | `string` | Expected `iss` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`. | defaultValue: "false",
519519| `--ws-max-clock-skew-seconds` | `number` | Clock skew allowance when validating signed bearer token `exp` and `nbf` claims. Requires `--ws-auth signed-bearer-token`. | description:
520520| `--ws-shared-secret-file` | `absolute path` | File containing the HMAC shared secret used to validate signed JWT bearer tokens. Required with `--ws-auth signed-bearer-token`. | "Include sessions outside the current working directory when selecting the most recent session.",
521521| `--ws-token-file` | `absolute path` | File containing the shared capability token. Required with `--ws-auth capability-token`. | },
522522 {
523523Key key: "--image, -i",
524524 type: "path[,path...]",
525525`--listen` description:
526526 "Attach one or more images to the follow-up prompt. Separate multiple paths with commas or repeat the flag.",
527527Type / Values },
528528 {
529529`stdio:// | ws://IP:PORT` key: "PROMPT",
530530 type: "string | - (read stdin)",
531531Details description:
532532 "Optional follow-up instruction sent immediately after resuming.",
533533Transport listener URL. Use `ws://IP:PORT` to expose a WebSocket endpoint for remote clients. },
534534 ];
535535Key
536536 export const forkOptions = [
537537`--ws-audience` {
538538 key: "SESSION_ID",
539539Type / Values type: "uuid",
540540 description:
541541`string` "Fork the specified session. Omit and use `--last` to fork the most recent session.",
542542 },
543543Details {
544544 key: "--last",
545545Expected `aud` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`. type: "boolean",
546546 defaultValue: "false",
547547Key description:
548548 "Skip the picker and fork the most recent conversation automatically.",
549549`--ws-auth` },
550550 {
551551Type / Values key: "--all",
552552 type: "boolean",
553553`capability-token | signed-bearer-token` defaultValue: "false",
554554 description:
555555Details "Show sessions beyond the current working directory in the picker.",
556556 },
557557Authentication mode for app-server WebSocket clients. If omitted, WebSocket auth is disabled; non-local listeners warn during startup.];
558558
559559Keyexport const execpolicyOptions = [
560560 {
561561`--ws-issuer` key: "--rules, -r",
562562 type: "path (repeatable)",
563563Type / Values description:
564564 "Path to an execpolicy rule file to evaluate. Provide multiple flags to combine rules across files.",
565565`string` },
566566 {
567567Details key: "--pretty",
568568 type: "boolean",
569569Expected `iss` claim for signed bearer tokens. Requires `--ws-auth signed-bearer-token`. defaultValue: "false",
570570 description: "Pretty-print the JSON result.",
571571Key },
572572 {
573573`--ws-max-clock-skew-seconds` key: "COMMAND...",
574574 type: "var-args",
575575Type / Values description: "Command to be checked against the specified policies.",
576576 },
577577`number`];
578578
579579Detailsexport const loginOptions = [
580580 {
581581Clock skew allowance when validating signed bearer token `exp` and `nbf` claims. Requires `--ws-auth signed-bearer-token`. key: "--with-api-key",
582582 type: "boolean",
583583Key description:
584584 "Read an API key from stdin (for example `printenv OPENAI_API_KEY | codex login --with-api-key`).",
585585`--ws-shared-secret-file` },
586586 {
587587Type / Values key: "--device-auth",
588588 type: "boolean",
589589`absolute path` description:
590590 "Use OAuth device code flow instead of launching a browser window.",
591591Details },
592592 {
593593File containing the HMAC shared secret used to validate signed JWT bearer tokens. Required with `--ws-auth signed-bearer-token`. key: "status subcommand",
594594 type: "codex login status",
595595Key description:
596596 "Print the active authentication mode and exit with 0 when logged in.",
597597`--ws-token-file` },
598598 ];
599599Type / Values
600600 export const applyOptions = [
601601`absolute path` {
602602 key: "TASK_ID",
603603Details type: "string",
604604 description:
605605File containing the shared capability token. Required with `--ws-auth capability-token`. "Identifier of the Codex Cloud task whose diff should be applied.",
606606 },
607607`codex app-server --listen stdio://` keeps the default JSONL-over-stdio behavior. `--listen ws://IP:PORT` enables WebSocket transport for app-server clients. The server accepts `ws://` listen URLs; use TLS termination or a secure proxy when clients connect with `wss://`. If you generate schemas for client bindings, add `--experimental` to include gated fields and methods.];
608608
609609### `codex app`export const sandboxMacOptions = [
610610 {
611611Launch Codex Desktop from the terminal on macOS or Windows. On macOS, Codex can open a specific workspace path; on Windows, Codex prints the path to open. key: "--permissions-profile",
612612 type: "NAME",
613613| Key | Type / Values | Details | description:
614614| --- | --- | --- | "Apply a named permissions profile from the active configuration stack.",
615615| `--download-url` | `url` | Advanced override for the Codex desktop installer URL used during install. | },
616616| `PATH` | `path` | Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path. | {
617617 key: "--cd, -C",
618618Key type: "DIR",
619619 description:
620620`--download-url` "Working directory used for profile resolution and command execution. Requires `--permissions-profile`.",
621621 },
622622Type / Values {
623623 key: "--include-managed-config",
624624`url` type: "boolean",
625625 defaultValue: "false",
626626Details description:
627627 "Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.",
628628Advanced override for the Codex desktop installer URL used during install. },
629629 {
630630Key key: "--allow-unix-socket",
631631 type: "path",
632632`PATH` description:
633633 "Allow the sandboxed command to bind or connect Unix sockets rooted at this path. Repeat to allow multiple paths.",
634634Type / Values },
635635 {
636636`path` key: "--log-denials",
637637 type: "boolean",
638638Details defaultValue: "false",
639639 description:
640640Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path. "Capture macOS sandbox denials with `log stream` while the command runs and print them after exit.",
641641 },
642642`codex app` opens an installed Codex Desktop app, or starts the installer when {
643643the app is missing. On macOS, Codex opens the provided workspace path; on key: "--config, -c",
644644Windows, it prints the path to open after installation. type: "key=value",
645645 description:
646646### `codex debug app-server send-message-v2` "Pass configuration overrides into the sandboxed run (repeatable).",
647647 },
648648Send one message through app-server's V2 thread/turn flow using the built-in app-server test client. {
649649 key: "COMMAND...",
650650| Key | Type / Values | Details | type: "var-args",
651651| --- | --- | --- | description:
652652| `USER_MESSAGE` | `string` | Message text sent to app-server through the built-in V2 test-client flow. | "Shell command to execute under macOS Seatbelt. Everything after `--` is forwarded.",
653653 },
654654Key];
655655
656656`USER_MESSAGE`export const sandboxLinuxOptions = [
657657 {
658658Type / Values key: "--permissions-profile",
659659 type: "NAME",
660660`string` description:
661661 "Apply a named permissions profile from the active configuration stack.",
662662Details },
663663 {
664664Message text sent to app-server through the built-in V2 test-client flow. key: "--cd, -C",
665665 type: "DIR",
666666This debug flow initializes with `experimentalApi: true`, starts a thread, sends a turn, and streams server notifications. Use it to reproduce and inspect app-server protocol behavior locally. description:
667667 "Working directory used for profile resolution and command execution. Requires `--permissions-profile`.",
668668### `codex apply` },
669669 {
670670Apply the most recent diff from a Codex cloud task to your local repository. You must authenticate and have access to the task. key: "--include-managed-config",
671671 type: "boolean",
672672| Key | Type / Values | Details | defaultValue: "false",
673673| --- | --- | --- | description:
674674| `TASK_ID` | `string` | Identifier of the Codex Cloud task whose diff should be applied. | "Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.",
675675 },
676676Key {
677677 key: "--config, -c",
678678`TASK_ID` type: "key=value",
679679 description:
680680Type / Values "Configuration overrides applied before launching the sandbox (repeatable).",
681681 },
682682`string` {
683683 key: "COMMAND...",
684684Details type: "var-args",
685685 description:
686686Identifier of the Codex Cloud task whose diff should be applied. "Command to execute under Landlock + seccomp. Provide the executable after `--`.",
687687 },
688688Codex prints the patched files and exits non-zero if `git apply` fails (for example, due to conflicts).];
689689
690690### `codex cloud`export const sandboxWindowsOptions = [
691691 {
692692Interact with Codex cloud tasks from the terminal. The default command opens an interactive picker; `codex cloud exec` submits a task directly, and `codex cloud list` returns recent tasks for scripting or quick inspection. key: "--permissions-profile",
693693 type: "NAME",
694694| Key | Type / Values | Details | description:
695695| --- | --- | --- | "Apply a named permissions profile from the active configuration stack.",
696696| `--attempts` | `1-4` | Number of assistant attempts (best-of-N) Codex Cloud should run. | },
697697| `--env` | `ENV_ID` | Target Codex Cloud environment identifier (required). Use `codex cloud` to list options. | {
698698| `QUERY` | `string` | Task prompt. If omitted, Codex prompts interactively for details. | key: "--cd, -C",
699699 type: "DIR",
700700Key description:
701701 "Working directory used for profile resolution and command execution. Requires `--permissions-profile`.",
702702`--attempts` },
703703 {
704704Type / Values key: "--include-managed-config",
705705 type: "boolean",
706706`1-4` defaultValue: "false",
707707 description:
708708Details "Include managed requirements while resolving an explicit permissions profile. Requires `--permissions-profile`.",
709709 },
710710Number of assistant attempts (best-of-N) Codex Cloud should run. {
711711 key: "--config, -c",
712712Key type: "key=value",
713713 description:
714714`--env` "Configuration overrides applied before launching the sandbox (repeatable).",
715715 },
716716Type / Values {
717717 key: "COMMAND...",
718718`ENV_ID` type: "var-args",
719719 description:
720720Details "Command to execute under the native Windows sandbox. Provide the executable after `--`.",
721721 },
722722Target Codex Cloud environment identifier (required). Use `codex cloud` to list options.];
723723
724724Keyexport const completionOptions = [
725725 {
726726`QUERY` key: "SHELL",
727727 type: "bash | zsh | fish | power-shell | elvish",
728728Type / Values defaultValue: "bash",
729729 description: "Shell to generate completions for. Output prints to stdout.",
730730`string` },
731731 ];
732732Details
733733 export const cloudExecOptions = [
734734Task prompt. If omitted, Codex prompts interactively for details. {
735735 key: "QUERY",
736736Authentication follows the same credentials as the main CLI. Codex exits non-zero if the task submission fails. type: "string",
737737 description:
738738#### `codex cloud list` "Task prompt. If omitted, Codex prompts interactively for details.",
739739 },
740740List recent cloud tasks with optional filtering and pagination. {
741741 key: "--env",
742742| Key | Type / Values | Details | type: "ENV_ID",
743743| --- | --- | --- | description:
744744| `--cursor` | `string` | Pagination cursor returned by a previous request. | "Target Codex Cloud environment identifier (required). Use `codex cloud` to list options.",
745745| `--env` | `ENV_ID` | Filter tasks by environment identifier. | },
746746| `--json` | `boolean` | Emit machine-readable JSON instead of plain text. | {
747747| `--limit` | `1-20` | Maximum number of tasks to return. | key: "--attempts",
748748 type: "1-4",
749749Key defaultValue: "1",
750750 description:
751751`--cursor` "Number of assistant attempts (best-of-N) Codex Cloud should run.",
752752 },
753753Type / Values];
754754
755755`string`export const cloudListOptions = [
756756 {
757757Details key: "--env",
758758 type: "ENV_ID",
759759Pagination cursor returned by a previous request. description: "Filter tasks by environment identifier.",
760760 },
761761Key {
762762 key: "--limit",
763763`--env` type: "1-20",
764764 defaultValue: "20",
765765Type / Values description: "Maximum number of tasks to return.",
766766 },
767767`ENV_ID` {
768768 key: "--cursor",
769769Details type: "string",
770770 description: "Pagination cursor returned by a previous request.",
771771Filter tasks by environment identifier. },
772772 {
773773Key key: "--json",
774774 type: "boolean",
775775`--json` defaultValue: "false",
776776 description: "Emit machine-readable JSON instead of plain text.",
777777Type / Values },
778778 ];
779779`boolean`
780780 export const mcpCommands = [
781781Details {
782782 key: "list",
783783Emit machine-readable JSON instead of plain text. type: "--json",
784784 description:
785785Key "List configured MCP servers. Add `--json` for machine-readable output.",
786786 },
787787`--limit` {
788788 key: "get <name>",
789789Type / Values type: "--json",
790790 description:
791791`1-20` "Show a specific server configuration. `--json` prints the raw config entry.",
792792 },
793793Details {
794794 key: "add <name>",
795795Maximum number of tasks to return. type: "-- <command...> | --url <value>",
796796 description:
797797Plain-text output prints a task URL followed by status details. Use `--json` for automation. The JSON payload contains a `tasks` array plus an optional `cursor` value. Each task includes `id`, `url`, `title`, `status`, `updated_at`, `environment_id`, `environment_label`, `summary`, `is_review`, and `attempt_total`. "Register a server using a stdio launcher command or a streamable HTTP URL. Supports `--env KEY=VALUE` for stdio transports.",
798798 },
799799### `codex completion` {
800800 key: "remove <name>",
801801Generate shell completion scripts and redirect the output to the appropriate location, for example `codex completion zsh > "${fpath[1]}/_codex"`. description: "Delete a stored MCP server definition.",
802802 },
803803| Key | Type / Values | Details | {
804804| --- | --- | --- | key: "login <name>",
805805| `SHELL` | `bash | zsh | fish | power-shell | elvish` | Shell to generate completions for. Output prints to stdout. | type: "--scopes scope1,scope2",
806806 description:
807807Key "Start an OAuth login for a streamable HTTP server (servers that support OAuth only).",
808808 },
809809`SHELL` {
810810 key: "logout <name>",
811811Type / Values description:
812812 "Remove stored OAuth credentials for a streamable HTTP server.",
813813`bash | zsh | fish | power-shell | elvish` },
814814 ];
815815Details
816816 export const mcpAddOptions = [
817817Shell to generate completions for. Output prints to stdout. {
818818 key: "COMMAND...",
819819### `codex features` type: "stdio transport",
820820 description:
821821Manage feature flags stored in `~/.codex/config.toml`. The `enable` and `disable` commands persist changes so they apply to future sessions. When you launch with `--profile`, Codex writes to that profile instead of the root configuration. "Executable plus arguments to launch the MCP server. Provide after `--`.",
822822 },
823823| Key | Type / Values | Details | {
824824| --- | --- | --- | key: "--env KEY=VALUE",
825825| `Disable subcommand` | `codex features disable <feature>` | Persistently disable a feature flag in `config.toml`. Respects the active `--profile` when provided. | type: "repeatable",
826826| `Enable subcommand` | `codex features enable <feature>` | Persistently enable a feature flag in `config.toml`. Respects the active `--profile` when provided. | description:
827827| `List subcommand` | `codex features list` | Show known feature flags, their maturity stage, and their effective state. | "Environment variable assignments applied when launching a stdio server.",
828828 },
829829Key {
830830 key: "--url",
831831`Disable subcommand` type: "https://…",
832832 description:
833833Type / Values "Register a streamable HTTP server instead of stdio. Mutually exclusive with `COMMAND...`.",
834834 },
835835`codex features disable <feature>` {
836836 key: "--bearer-token-env-var",
837837Details type: "ENV_VAR",
838838 description:
839839Persistently disable a feature flag in `config.toml`. Respects the active `--profile` when provided. "Environment variable whose value is sent as a bearer token when connecting to a streamable HTTP server.",
840840 },
841841Key];
842842
843843`Enable subcommand`export const marketplaceCommands = [
844844 {
845845Type / Values key: "add <source>",
846846 type: "[--ref REF] [--sparse PATH]",
847847`codex features enable <feature>` description:
848848 "Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. `--sparse` is supported only for Git sources and can be repeated.",
849849Details },
850850 {
851851Persistently enable a feature flag in `config.toml`. Respects the active `--profile` when provided. key: "upgrade [marketplace-name]",
852852 description:
853853Key "Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided.",
854854 },
855855`List subcommand` {
856856 key: "remove <marketplace-name>",
857857Type / Values description: "Remove a configured plugin marketplace.",
858858 },
859859`codex features list`];
860
861Details
862
863Show known feature flags, their maturity stage, and their effective state.
864
865### `codex exec`
866
867Use `codex exec` (or the short form `codex e`) for scripted or CI-style runs that should finish without human interaction.
868
869| Key | Type / Values | Details |
870| --- | --- | --- |
871| `--cd, -C` | `path` | Set the workspace root before executing the task. |
872| `--color` | `always | never | auto` | Control ANSI color in stdout. |
873| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner. |
874| `--ephemeral` | `boolean` | Run without persisting session rollout files to disk. |
875| `--full-auto` | `boolean` | Apply the low-friction automation preset (`workspace-write` sandbox and `on-request` approvals). |
876| `--image, -i` | `path[,path...]` | Attach images to the first message. Repeatable; supports comma-separated lists. |
877| `--json, --experimental-json` | `boolean` | Print newline-delimited JSON events instead of formatted text. |
878| `--model, -m` | `string` | Override the configured model for this run. |
879| `--oss` | `boolean` | Use the local open source provider (requires a running Ollama instance). |
880| `--output-last-message, -o` | `path` | Write the assistant’s final message to a file. Useful for downstream scripting. |
881| `--output-schema` | `path` | JSON Schema file describing the expected final response shape. Codex validates tool output against it. |
882| `--profile, -p` | `string` | Select a configuration profile defined in config.toml. |
883| `--sandbox, -s` | `read-only | workspace-write | danger-full-access` | Sandbox policy for model-generated commands. Defaults to configuration. |
884| `--skip-git-repo-check` | `boolean` | Allow running outside a Git repository (useful for one-off directories). |
885| `-c, --config` | `key=value` | Inline configuration override for the non-interactive run (repeatable). |
886| `PROMPT` | `string | - (read stdin)` | Initial instruction for the task. Use `-` to pipe the prompt from stdin. |
887| `Resume subcommand` | `codex exec resume [SESSION_ID]` | Resume an exec session by ID or add `--last` to continue the most recent session from the current working directory. Add `--all` to consider sessions from any directory. Accepts an optional follow-up prompt. |
888
889Key
890
891`--cd, -C`
892
893Type / Values
894
895`path`
896
897Details
898
899Set the workspace root before executing the task.
900
901Key
902
903`--color`
904
905Type / Values
906
907`always | never | auto`
908
909Details
910
911Control ANSI color in stdout.
912
913Key
914
915`--dangerously-bypass-approvals-and-sandbox, --yolo`
916
917Type / Values
918
919`boolean`
920
921Details
922
923Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner.
924
925Key
926
927`--ephemeral`
928
929Type / Values
930
931`boolean`
932
933Details
934
935Run without persisting session rollout files to disk.
936
937Key
938
939`--full-auto`
940
941Type / Values
942
943`boolean`
944
945Details
946
947Apply the low-friction automation preset (`workspace-write` sandbox and `on-request` approvals).
948
949Key
950
951`--image, -i`
952
953Type / Values
954
955`path[,path...]`
956
957Details
958
959Attach images to the first message. Repeatable; supports comma-separated lists.
960
961Key
962
963`--json, --experimental-json`
964
965Type / Values
966
967`boolean`
968
969Details
970
971Print newline-delimited JSON events instead of formatted text.
972
973Key
974 860
975861`--model, -m`## How to read this reference
976
977Type / Values
978
979`string`
980
981Details
982
983Override the configured model for this run.
984
985Key
986
987`--oss`
988
989Type / Values
990
991`boolean`
992
993Details
994
995Use the local open source provider (requires a running Ollama instance).
996 862
997863KeyThis page catalogs every documented Codex CLI command and flag. Use the interactive tables to search by key or description. Each section indicates whether the option is stable or experimental and calls out risky combinations.
998 864
999865`--output-last-message, -o`The CLI inherits most defaults from <code>~/.codex/config.toml</code>. Any
866 <code>-c key=value</code> overrides you pass at the command line take
867 precedence for that invocation. See [Config
868 basics](https://developers.openai.com/codex/config-basic#configuration-precedence) for more information.
1000 869
1001870Type / Values## Global flags
1002 871
1003872`path`<ConfigTable client:load options={globalFlagOptions} />
1004 873
1005874DetailsThese options apply to the base `codex` command and propagate to each subcommand unless a section below specifies otherwise.
875When you run a subcommand, place global flags after it (for example, `codex exec --oss ...`) so Codex applies them as intended.
1006 876
1007877Write the assistant’s final message to a file. Useful for downstream scripting.## Command overview
1008 878
1009879KeyThe Maturity column uses feature maturity labels such as Experimental, Beta,
880 and Stable. See [Feature Maturity](https://developers.openai.com/codex/feature-maturity) for how to
881 interpret these labels.
1010 882
1011883`--output-schema`<ConfigTable
884 client:load
885 options={commandOverview}
886 secondColumnTitle="Maturity"
887 secondColumnVariant="maturity"
888/>
1012 889
1013890Type / Values## Command details
1014 891
1015892`path`### `codex` (interactive)
1016 893
1017894DetailsRunning `codex` with no subcommand launches the interactive terminal UI (TUI). The agent accepts the global flags above plus image attachments. Web search defaults to cached mode; use `--search` to switch to live browsing. For low-friction local work, use `--sandbox workspace-write --ask-for-approval on-request`.
1018 895
1019896JSON Schema file describing the expected final response shape. Codex validates tool output against it.Use `--remote ws://host:port` or `--remote wss://host:port` to connect the TUI to an app server started with `codex app-server --listen ws://IP:PORT`. Add `--remote-auth-token-env <ENV_VAR>` when the server requires a bearer token for WebSocket authentication. See [Codex CLI features](https://developers.openai.com/codex/cli/features#connect-the-tui-to-a-remote-app-server) for setup examples and authentication guidance.
1020 897
1021898Key### `codex app-server`
1022 899
1023900`--profile, -p`Launch the Codex app server locally. This is primarily for development and debugging and may change without notice.
1024 901
1025902Type / Values<ConfigTable client:load options={appServerOptions} />
1026 903
1027904`string``codex app-server --listen stdio://` keeps the default JSONL-over-stdio behavior. `--listen ws://IP:PORT` enables WebSocket transport for app-server clients. The server accepts `ws://` listen URLs; use TLS termination or a secure proxy when clients connect with `wss://`. If you generate schemas for client bindings, add `--experimental` to include gated fields and methods.
1028 905
1029906Details### `codex app`
1030 907
1031908Select a configuration profile defined in config.toml.Launch Codex Desktop from the terminal on macOS or Windows. On macOS, Codex can open a specific workspace path; on Windows, Codex prints the path to open.
1032 909
1033910Key<ConfigTable client:load options={appOptions} />
1034 911
1035912`--sandbox, -s``codex app` opens an installed Codex Desktop app, or starts the installer when
913the app is missing. On macOS, Codex opens the provided workspace path; on
914Windows, it prints the path to open after installation.
1036 915
1037916Type / Values### `codex debug app-server send-message-v2`
1038 917
1039918`read-only | workspace-write | danger-full-access`Send one message through app-server's V2 thread/turn flow using the built-in app-server test client.
1040 919
1041920Details<ConfigTable client:load options={debugAppServerSendMessageV2Options} />
1042 921
1043922Sandbox policy for model-generated commands. Defaults to configuration.This debug flow initializes with `experimentalApi: true`, starts a thread, sends a turn, and streams server notifications. Use it to reproduce and inspect app-server protocol behavior locally.
1044 923
1045924Key### `codex debug models`
1046 925
1047926`--skip-git-repo-check`Print the raw model catalog Codex sees as JSON.
1048 927
1049928Type / Values<ConfigTable client:load options={debugModelsOptions} />
1050 929
1051930`boolean`Use `--bundled` when you want to inspect only the catalog bundled with the current binary, without refreshing from the remote models endpoint.
1052 931
1053932Details### `codex apply`
1054 933
1055934Allow running outside a Git repository (useful for one-off directories).Apply the most recent diff from a Codex cloud task to your local repository. You must authenticate and have access to the task.
1056 935
1057936Key<ConfigTable client:load options={applyOptions} />
1058 937
1059938`-c, --config`Codex prints the patched files and exits non-zero if `git apply` fails (for example, due to conflicts).
1060 939
1061940Type / Values### `codex cloud`
1062 941
1063942`key=value`Interact with Codex cloud tasks from the terminal. The default command opens an interactive picker; `codex cloud exec` submits a task directly, and `codex cloud list` returns recent tasks for scripting or quick inspection.
1064 943
1065944Details<ConfigTable client:load options={cloudExecOptions} />
1066 945
1067946Inline configuration override for the non-interactive run (repeatable).Authentication follows the same credentials as the main CLI. Codex exits non-zero if the task submission fails.
1068 947
1069948Key#### `codex cloud list`
1070 949
1071950`PROMPT`List recent cloud tasks with optional filtering and pagination.
1072 951
1073952Type / Values<ConfigTable client:load options={cloudListOptions} />
1074 953
1075954`string | - (read stdin)`Plain-text output prints a task URL followed by status details. Use `--json` for automation. The JSON payload contains a `tasks` array plus an optional `cursor` value. Each task includes `id`, `url`, `title`, `status`, `updated_at`, `environment_id`, `environment_label`, `summary`, `is_review`, and `attempt_total`.
1076 955
1077956Details### `codex completion`
1078 957
1079958Initial instruction for the task. Use `-` to pipe the prompt from stdin.Generate shell completion scripts and redirect the output to the appropriate location, for example `codex completion zsh > "${fpath[1]}/_codex"`.
1080 959
1081960Key<ConfigTable client:load options={completionOptions} />
1082 961
1083962`Resume subcommand`### `codex features`
1084 963
1085964Type / ValuesManage feature flags stored in `~/.codex/config.toml`. The `enable` and `disable` commands persist changes so they apply to future sessions. When you launch with `--profile`, Codex writes to that profile instead of the root configuration.
1086 965
1087966`codex exec resume [SESSION_ID]`<ConfigTable client:load options={featuresOptions} />
1088 967
1089968Details### `codex exec`
1090 969
1091970Resume an exec session by ID or add `--last` to continue the most recent session from the current working directory. Add `--all` to consider sessions from any directory. Accepts an optional follow-up prompt.Use `codex exec` (or the short form `codex e`) for scripted or CI-style runs that should finish without human interaction.
1092 971
1093972Expand to view all<ConfigTable client:load options={execOptions} />
1094 973
1095Codex writes formatted output by default. Add `--json` to receive newline-delimited JSON events (one per state change). The optional `resume` subcommand lets you continue non-interactive tasks. Use `--last` to pick the most recent session from the current working directory, or add `--all` to search across all sessions:974Codex writes formatted output by default. Add `--json` to receive newline-delimited JSON events (one per state change). The optional `resume` subcommand lets you continue non-interactive tasks. Use `--last` to pick the most recent session from the current working directory, or add `--all` to search across all sessions:
1096 975
1097976| Key | Type / Values | Details |<ConfigTable client:load options={execResumeOptions} />
1098| --- | --- | --- |
1099| `--all` | `boolean` | Include sessions outside the current working directory when selecting the most recent session. |
1100| `--image, -i` | `path[,path...]` | Attach one or more images to the follow-up prompt. Separate multiple paths with commas or repeat the flag. |
1101| `--last` | `boolean` | Resume the most recent conversation from the current working directory. |
1102| `PROMPT` | `string | - (read stdin)` | Optional follow-up instruction sent immediately after resuming. |
1103| `SESSION_ID` | `uuid` | Resume the specified session. Omit and use `--last` to continue the most recent session. |
1104
1105Key
1106
1107`--all`
1108
1109Type / Values
1110
1111`boolean`
1112
1113Details
1114
1115Include sessions outside the current working directory when selecting the most recent session.
1116
1117Key
1118
1119`--image, -i`
1120
1121Type / Values
1122
1123`path[,path...]`
1124
1125Details
1126
1127Attach one or more images to the follow-up prompt. Separate multiple paths with commas or repeat the flag.
1128
1129Key
1130
1131`--last`
1132
1133Type / Values
1134
1135`boolean`
1136
1137Details
1138
1139Resume the most recent conversation from the current working directory.
1140
1141Key
1142
1143`PROMPT`
1144
1145Type / Values
1146
1147`string | - (read stdin)`
1148
1149Details
1150
1151Optional follow-up instruction sent immediately after resuming.
1152
1153Key
1154
1155`SESSION_ID`
1156
1157Type / Values
1158
1159`uuid`
1160
1161Details
1162
1163Resume the specified session. Omit and use `--last` to continue the most recent session.
1164 977
1165### `codex execpolicy`978### `codex execpolicy`
1166 979
1167Check `execpolicy` rule files before you save them. `codex execpolicy check` accepts one or more `--rules` flags (for example, files under `~/.codex/rules`) and emits JSON showing the strictest decision and any matching rules. Add `--pretty` to format the output. The `execpolicy` command is currently in preview.980Check `execpolicy` rule files before you save them. `codex execpolicy check` accepts one or more `--rules` flags (for example, files under `~/.codex/rules`) and emits JSON showing the strictest decision and any matching rules. Add `--pretty` to format the output. The `execpolicy` command is currently in preview.
1168 981
1169982| Key | Type / Values | Details |<ConfigTable client:load options={execpolicyOptions} />
1170| --- | --- | --- |
1171| `--pretty` | `boolean` | Pretty-print the JSON result. |
1172| `--rules, -r` | `path (repeatable)` | Path to an execpolicy rule file to evaluate. Provide multiple flags to combine rules across files. |
1173| `COMMAND...` | `var-args` | Command to be checked against the specified policies. |
1174
1175Key
1176
1177`--pretty`
1178
1179Type / Values
1180
1181`boolean`
1182
1183Details
1184
1185Pretty-print the JSON result.
1186
1187Key
1188
1189`--rules, -r`
1190
1191Type / Values
1192
1193`path (repeatable)`
1194
1195Details
1196
1197Path to an execpolicy rule file to evaluate. Provide multiple flags to combine rules across files.
1198
1199Key
1200
1201`COMMAND...`
1202
1203Type / Values
1204
1205`var-args`
1206
1207Details
1208
1209Command to be checked against the specified policies.
1210 983
1211### `codex login`984### `codex login`
1212 985
1213Authenticate the CLI with a ChatGPT account or API key. With no flags, Codex opens a browser for the ChatGPT OAuth flow.986Authenticate the CLI with a ChatGPT account or API key. With no flags, Codex opens a browser for the ChatGPT OAuth flow.
1214 987
1215988| Key | Type / Values | Details |<ConfigTable client:load options={loginOptions} />
1216| --- | --- | --- |
1217| `--device-auth` | `boolean` | Use OAuth device code flow instead of launching a browser window. |
1218| `--with-api-key` | `boolean` | Read an API key from stdin (for example `printenv OPENAI_API_KEY | codex login --with-api-key`). |
1219| `status subcommand` | `codex login status` | Print the active authentication mode and exit with 0 when logged in. |
1220
1221Key
1222
1223`--device-auth`
1224
1225Type / Values
1226
1227`boolean`
1228
1229Details
1230
1231Use OAuth device code flow instead of launching a browser window.
1232
1233Key
1234
1235`--with-api-key`
1236
1237Type / Values
1238
1239`boolean`
1240
1241Details
1242
1243Read an API key from stdin (for example `printenv OPENAI_API_KEY | codex login --with-api-key`).
1244
1245Key
1246
1247`status subcommand`
1248
1249Type / Values
1250
1251`codex login status`
1252
1253Details
1254
1255Print the active authentication mode and exit with 0 when logged in.
1256 989
1257`codex login status` exits with `0` when credentials are present, which is helpful in automation scripts.990`codex login status` exits with `0` when credentials are present, which is helpful in automation scripts.
1258 991
1264 997
1265Manage Model Context Protocol server entries stored in `~/.codex/config.toml`.998Manage Model Context Protocol server entries stored in `~/.codex/config.toml`.
1266 999
12671000| Key | Type / Values | Details |<ConfigTable client:load options={mcpCommands} />
1268| --- | --- | --- |
1269| `add <name>` | `-- <command...> | --url <value>` | Register a server using a stdio launcher command or a streamable HTTP URL. Supports `--env KEY=VALUE` for stdio transports. |
1270| `get <name>` | `--json` | Show a specific server configuration. `--json` prints the raw config entry. |
1271| `list` | `--json` | List configured MCP servers. Add `--json` for machine-readable output. |
1272| `login <name>` | `--scopes scope1,scope2` | Start an OAuth login for a streamable HTTP server (servers that support OAuth only). |
1273| `logout <name>` | | Remove stored OAuth credentials for a streamable HTTP server. |
1274| `remove <name>` | | Delete a stored MCP server definition. |
1275
1276Key
1277
1278`add <name>`
1279
1280Type / Values
1281
1282`-- <command...> | --url <value>`
1283
1284Details
1285
1286Register a server using a stdio launcher command or a streamable HTTP URL. Supports `--env KEY=VALUE` for stdio transports.
1287
1288Key
1289
1290`get <name>`
1291
1292Type / Values
1293
1294`--json`
1295
1296Details
1297
1298Show a specific server configuration. `--json` prints the raw config entry.
1299
1300Key
1301
1302`list`
1303
1304Type / Values
1305
1306`--json`
1307
1308Details
1309
1310List configured MCP servers. Add `--json` for machine-readable output.
1311
1312Key
1313
1314`login <name>`
1315
1316Type / Values
1317
1318`--scopes scope1,scope2`
1319
1320Details
1321
1322Start an OAuth login for a streamable HTTP server (servers that support OAuth only).
1323
1324Key
1325
1326`logout <name>`
1327
1328Details
1329
1330Remove stored OAuth credentials for a streamable HTTP server.
1331
1332Key
1333
1334`remove <name>`
1335
1336Details
1337
1338Delete a stored MCP server definition.
1339 1001
1340The `add` subcommand supports both stdio and streamable HTTP transports:1002The `add` subcommand supports both stdio and streamable HTTP transports:
1341 1003
13421004| Key | Type / Values | Details |<ConfigTable client:load options={mcpAddOptions} />
1343| --- | --- | --- |
1344| `--bearer-token-env-var` | `ENV_VAR` | Environment variable whose value is sent as a bearer token when connecting to a streamable HTTP server. |
1345| `--env KEY=VALUE` | `repeatable` | Environment variable assignments applied when launching a stdio server. |
1346| `--url` | `https://…` | Register a streamable HTTP server instead of stdio. Mutually exclusive with `COMMAND...`. |
1347| `COMMAND...` | `stdio transport` | Executable plus arguments to launch the MCP server. Provide after `--`. |
1348
1349Key
1350
1351`--bearer-token-env-var`
1352
1353Type / Values
1354
1355`ENV_VAR`
1356
1357Details
1358
1359Environment variable whose value is sent as a bearer token when connecting to a streamable HTTP server.
1360
1361Key
1362
1363`--env KEY=VALUE`
1364
1365Type / Values
1366
1367`repeatable`
1368
1369Details
1370
1371Environment variable assignments applied when launching a stdio server.
1372
1373Key
1374
1375`--url`
1376
1377Type / Values
1378
1379`https://…`
1380
1381Details
1382
1383Register a streamable HTTP server instead of stdio. Mutually exclusive with `COMMAND...`.
1384
1385Key
1386
1387`COMMAND...`
1388
1389Type / Values
1390
1391`stdio transport`
1392
1393Details
1394
1395Executable plus arguments to launch the MCP server. Provide after `--`.
1396 1005
1397OAuth actions (`login`, `logout`) only work with streamable HTTP servers (and only when the server supports OAuth).1006OAuth actions (`login`, `logout`) only work with streamable HTTP servers (and only when the server supports OAuth).
1398 1007
1400 1009
1401Manage plugin marketplace sources that Codex can browse and install from.1010Manage plugin marketplace sources that Codex can browse and install from.
1402 1011
14031012| Key | Type / Values | Details |<ConfigTable client:load options={marketplaceCommands} />
1404| --- | --- | --- |
1405| `add <source>` | `[--ref REF] [--sparse PATH]` | Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. `--sparse` is supported only for Git sources and can be repeated. |
1406| `remove <marketplace-name>` | | Remove a configured plugin marketplace. |
1407| `upgrade [marketplace-name]` | | Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided. |
1408
1409Key
1410
1411`add <source>`
1412
1413Type / Values
1414
1415`[--ref REF] [--sparse PATH]`
1416
1417Details
1418
1419Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. `--sparse` is supported only for Git sources and can be repeated.
1420
1421Key
1422
1423`remove <marketplace-name>`
1424
1425Details
1426
1427Remove a configured plugin marketplace.
1428
1429Key
1430
1431`upgrade [marketplace-name]`
1432
1433Details
1434
1435Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided.
1436 1013
1437`codex plugin marketplace add` accepts GitHub shorthand such as `owner/repo` or1014`codex plugin marketplace add` accepts GitHub shorthand such as `owner/repo` or
1438`owner/repo@ref`, HTTP or HTTPS Git URLs, SSH Git URLs, and local marketplace1015`owner/repo@ref`, HTTP or HTTPS Git URLs, SSH Git URLs, and local marketplace
1447 1024
1448Continue an interactive session by ID or resume the most recent conversation. `codex resume` scopes `--last` to the current working directory unless you pass `--all`. It accepts the same global flags as `codex`, including model and sandbox overrides.1025Continue an interactive session by ID or resume the most recent conversation. `codex resume` scopes `--last` to the current working directory unless you pass `--all`. It accepts the same global flags as `codex`, including model and sandbox overrides.
1449 1026
14501027| Key | Type / Values | Details |<ConfigTable client:load options={resumeOptions} />
1451| --- | --- | --- |
1452| `--all` | `boolean` | Include sessions outside the current working directory when selecting the most recent session. |
1453| `--last` | `boolean` | Skip the picker and resume the most recent conversation from the current working directory. |
1454| `SESSION_ID` | `uuid` | Resume the specified session. Omit and use `--last` to continue the most recent session. |
1455
1456Key
1457
1458`--all`
1459
1460Type / Values
1461
1462`boolean`
1463
1464Details
1465
1466Include sessions outside the current working directory when selecting the most recent session.
1467
1468Key
1469
1470`--last`
1471
1472Type / Values
1473
1474`boolean`
1475
1476Details
1477
1478Skip the picker and resume the most recent conversation from the current working directory.
1479
1480Key
1481
1482`SESSION_ID`
1483
1484Type / Values
1485
1486`uuid`
1487
1488Details
1489
1490Resume the specified session. Omit and use `--last` to continue the most recent session.
1491 1028
1492### `codex fork`1029### `codex fork`
1493 1030
1494Fork a previous interactive session into a new thread. By default, `codex fork` opens the session picker; add `--last` to fork your most recent session instead.1031Fork a previous interactive session into a new thread. By default, `codex fork` opens the session picker; add `--last` to fork your most recent session instead.
1495 1032
14961033| Key | Type / Values | Details |<ConfigTable client:load options={forkOptions} />
1497| --- | --- | --- |
1498| `--all` | `boolean` | Show sessions beyond the current working directory in the picker. |
1499| `--last` | `boolean` | Skip the picker and fork the most recent conversation automatically. |
1500| `SESSION_ID` | `uuid` | Fork the specified session. Omit and use `--last` to fork the most recent session. |
1501
1502Key
1503
1504`--all`
1505
1506Type / Values
1507
1508`boolean`
1509
1510Details
1511
1512Show sessions beyond the current working directory in the picker.
1513
1514Key
1515
1516`--last`
1517
1518Type / Values
1519
1520`boolean`
1521
1522Details
1523
1524Skip the picker and fork the most recent conversation automatically.
1525
1526Key
1527
1528`SESSION_ID`
1529
1530Type / Values
1531
1532`uuid`
1533
1534Details
1535
1536Fork the specified session. Omit and use `--last` to fork the most recent session.
1537 1034
1538### `codex sandbox`1035### `codex sandbox`
1539 1036
1541 1038
1542#### macOS seatbelt1039#### macOS seatbelt
1543 1040
15441041| Key | Type / Values | Details |<ConfigTable client:load options={sandboxMacOptions} />
1545| --- | --- | --- |
1546| `--config, -c` | `key=value` | Pass configuration overrides into the sandboxed run (repeatable). |
1547| `--full-auto` | `boolean` | Grant write access to the current workspace and `/tmp` without approvals. |
1548| `COMMAND...` | `var-args` | Shell command to execute under macOS Seatbelt. Everything after `--` is forwarded. |
1549
1550Key
1551
1552`--config, -c`
1553
1554Type / Values
1555
1556`key=value`
1557
1558Details
1559
1560Pass configuration overrides into the sandboxed run (repeatable).
1561
1562Key
1563
1564`--full-auto`
1565
1566Type / Values
1567
1568`boolean`
1569
1570Details
1571
1572Grant write access to the current workspace and `/tmp` without approvals.
1573
1574Key
1575
1576`COMMAND...`
1577
1578Type / Values
1579
1580`var-args`
1581
1582Details
1583
1584Shell command to execute under macOS Seatbelt. Everything after `--` is forwarded.
1585 1042
1586#### Linux Landlock1043#### Linux Landlock
1587 1044
15881045| Key | Type / Values | Details |<ConfigTable client:load options={sandboxLinuxOptions} />
1589| --- | --- | --- |
1590| `--config, -c` | `key=value` | Configuration overrides applied before launching the sandbox (repeatable). |
1591| `--full-auto` | `boolean` | Grant write access to the current workspace and `/tmp` inside the Landlock sandbox. |
1592| `COMMAND...` | `var-args` | Command to execute under Landlock + seccomp. Provide the executable after `--`. |
1593
1594Key
1595
1596`--config, -c`
1597
1598Type / Values
1599
1600`key=value`
1601
1602Details
1603
1604Configuration overrides applied before launching the sandbox (repeatable).
1605
1606Key
1607
1608`--full-auto`
1609
1610Type / Values
1611
1612`boolean`
1613
1614Details
1615
1616Grant write access to the current workspace and `/tmp` inside the Landlock sandbox.
1617
1618Key
1619
1620`COMMAND...`
1621 1046
16221047Type / Values#### Windows
1623 1048
16241049`var-args`<ConfigTable client:load options={sandboxWindowsOptions} />
1625 1050
16261051Details### `codex update`
1627 1052
16281053Command to execute under Landlock + seccomp. Provide the executable after `--`.Check for and apply a Codex CLI update when the installed release supports self-update. Debug builds print a message telling you to install a release build instead.
1629 1054
1630## Flag combinations and safety tips1055## Flag combinations and safety tips
1631 1056
16321057- Set `--full-auto` for unattended local work, but avoid combining it with `--dangerously-bypass-approvals-and-sandbox` unless you are inside a dedicated sandbox VM.- Use `--sandbox workspace-write` for unattended local work that can stay inside the workspace, and avoid `--dangerously-bypass-approvals-and-sandbox` unless you are inside a dedicated sandbox VM.
1633- When you need to grant Codex write access to more directories, prefer `--add-dir` rather than forcing `--sandbox danger-full-access`.1058- When you need to grant Codex write access to more directories, prefer `--add-dir` rather than forcing `--sandbox danger-full-access`.
1634- Pair `--json` with `--output-last-message` in CI to capture machine-readable progress and a final natural-language summary.1059- Pair `--json` with `--output-last-message` in CI to capture machine-readable progress and a final natural-language summary.
1635 1060