Verified
New since your last visit
Unverified
Keyboard & TUI
Composer
| Item | Description |
|---|---|
#@ | Search workspace files and insert a path into the prompt |
#! | Prefix a line to run a shell command under current approval and sandbox settings |
#Up / Down | Restore draft history |
#Ctrl R | Search prompt history — Enter uses a match, Esc cancels |
#Ctrl O | Copy the latest completed Codex output
|
#Ctrl G | Open the composer in $VISUAL, or $EDITOR when unset
|
#Esc Esc | Edit the previous user message and fork the chat from that point
|
#Ctrl C | Close the session (same as /exit) |
While Codex is working
| Item | Description |
|---|---|
#Tab | Queue a follow-up prompt, slash command or shell command for the next turn
|
#Enter | Inject new instructions into the current turn |
Appearance & bindings
| Item | Description |
|---|---|
#/keymap | Inspect, remap and persist TUI shortcut bindings
|
#tui.keymap.<context>.<action> | Bind a TUI action; an empty array unbinds it
|
#/theme | Preview and persist a syntax-highlighting theme
|
#/vim | Toggle Vim normal/insert behaviour in the composer
|
#/raw | Toggle raw scrollback for copy-friendly terminal selection
|
#/statusline | Pick and reorder TUI footer items
|
#/title | Pick and reorder terminal window/tab title items |
#codex completion zsh | Generate a shell completion script (bash, zsh, fish, powershell)
|
#--no-alt-screen | Run the TUI inline, preserving terminal scrollback
|
Slash Commands (Core)
Model & behaviour
| Item | Description |
|---|---|
#/model | Choose the active model, and reasoning effort where available |
#/fast | Toggle the current model’s Fast service tier and persist it
|
#/personality | Pick a communication style for responses
|
#/plan | Switch to plan mode, optionally with a prompt
|
#/goal | Set, edit, pause, resume, view or clear a persistent task goal |
Permissions & review
| Item | Description |
|---|---|
#/permissions | Set what Codex may do without asking first |
#/approve | Approve one retry of a recent auto-review denial |
#/review | Ask Codex to review your working tree |
#/diff | Show the Git diff, including files Git is not tracking yet |
Session lifecycle
| Item | Description |
|---|---|
#/new | Start a new chat inside the same CLI session |
#/clear | Clear the terminal and start a fresh chat together |
#/rename | Rename the current chat |
#/resume | Resume a saved chat from your session list |
#/fork | Fork the current chat into a new chat |
#/side / /btw | Start an ephemeral side chat
|
#/archive | Archive the current session and exit |
#/delete | Permanently delete the current session and exit
|
#/quit / /exit | Exit the CLI |
Context & output
| Item | Description |
|---|---|
#/compact | Summarise the visible chat to free tokens |
#/mention | Attach a file or folder to the chat |
#/copy | Copy the latest completed Codex output |
#/ide | Include open files, selection and other IDE context |
#/app | Continue the current session in the ChatGPT desktop app (macOS, Windows) |
#/status | Show session configuration and token usage
|
Slash Commands (Tools)
Extensibility
| Item | Description |
|---|---|
#/skills | Browse and use local skills |
#/plugins | Browse installed and discoverable plugins
|
#/hooks | View, trust and manage lifecycle hooks
|
#/mcp | List configured MCP tools
|
#/apps | Browse apps (connectors) and insert them into your prompt
|
#/agent / /subagents | Switch the active agent thread |
#/memories | Turn memory injection or memory generation on or off |
#/init | Generate an AGENTS.md scaffold in the current directory |
#/import | Import Claude Code or Cursor setup, projects and chats |
#/experimental | Toggle experimental features such as network proxy or prevent-sleep |
CLI & Subcommands
Global flags
| Item | Description |
|---|---|
#-m, --model <MODEL> | Model the agent should use |
#-c, --config <key=value> | Override one config value for this invocation
|
#-p, --profile <NAME> | Layer $CODEX_HOME/<name>.config.toml over the base config |
#-s, --sandbox <MODE> | Sandbox policy: read-only, workspace-write, danger-full-access |
#-a, --ask-for-approval <POLICY> | When to require human approval: on-request or never |
#-C, --cd <DIR> | Use this directory as the agent’s working root |
#--add-dir <DIR> | Additional directories writable alongside the primary workspace
|
#--worktree | Run the session in a new managed Git worktree |
#-i, --image <FILE> | Attach one or more images to the initial prompt |
#--search | Enable live web search for the model (no per-call approval) |
#--oss | Use an open-source provider |
#--local-provider <PROVIDER> | Pick the local provider with --oss: lmstudio or ollama |
#--enable <FEATURE> / --disable <FEATURE> | Enable or disable a feature flag; both are repeatable
|
#--strict-config | Fail when config.toml has keys this version does not recognise |
#--approve-for-me | Route approval requests through automatic review using the workspace-write sandbox |
#--dangerously-bypass-approvals-and-sandbox | Skip every prompt and run unsandboxed
|
#--dangerously-bypass-hook-trust | Run enabled hooks without persisted hook trust for this invocation
|
#--remote <ADDR> | Connect the TUI to a remote app server
|
#--remote-auth-token-env <ENV_VAR> | Name of the env var holding the remote app-server bearer token |
#-V, --version / -h, --help | Print the version |
Sessions & threads
| Item | Description |
|---|---|
#codex resume | Resume a previous interactive session; picker by default
|
#codex fork | Fork a previous session into a new one; picker by default
|
#codex queue | Queue a message for an existing session |
#codex archive | Archive a saved session by id or name |
#codex unarchive | Restore an archived session |
#codex delete | Permanently delete a saved session by id or name |
#codex agents | Browse all agent sessions on the shared local app-server daemon |
#codex migrate-rollouts | Inspect or migrate legacy local sessions to paginated thread history |
Run & review
| Item | Description |
|---|---|
#codex exec / codex e | Run Codex non-interactively
|
#codex review | Run a code review non-interactively
|
#codex apply / codex a | Apply the agent’s latest diff to your working tree with git apply |
Auth
| Item | Description |
|---|---|
#codex login | Authenticate with a ChatGPT account, API key or access token
|
#codex logout | Remove stored authentication credentials |
MCP & plugins
| Item | Description |
|---|---|
#codex mcp | Manage external MCP servers
|
#codex plugin | Manage Codex plugins
|
Sandbox & policy
| Item | Description |
|---|---|
#codex sandbox | Run a command under the same sandbox policy Codex uses internally
|
#codex execpolicy check | Validate execpolicy rule files against a command
|
Diagnostics & maintenance
| Item | Description |
|---|---|
#codex doctor | Diagnose the local installation, config, auth and runtime health |
#codex features | Inspect feature flags
|
#codex debug | Debugging tools
|
#codex update | Update the CLI when the installed release supports self-update |
#codex completion | Generate a shell completion script |
#codex cloud | Browse Codex Cloud tasks and apply changes locally
|
#codex app-server | Run the app server or related tooling
|
#codex remote-control | Manage the app-server daemon with remote control enabled
|
#codex exec-server | Run the standalone exec-server service
|
#codex mcp-server | Removed in v0.154.0 — use the Codex app server instead
|
Settings (config.toml)
Files & precedence
| Item | Description |
|---|---|
#~/.codex/config.toml | User-level configuration; the root is $CODEX_HOME
|
#$CODEX_HOME/<name>.config.toml | A config profile layer, selected with --profile <name> |
#requirements.toml | Administrator-managed policy layer
|
Model
| Item | Description |
|---|---|
#model | Model to use |
#review_model | Model override used by /review; defaults to the session model |
#model_provider | Provider id from model_providers; defaults to openai |
#model_reasoning_effort | Reasoning effort: minimal, low, medium, high, xhigh
|
#plan_mode_reasoning_effort | Reasoning effort used while in plan mode |
#model_reasoning_summary | Summary detail: auto, concise, detailed, none
|
#model_verbosity | GPT-5 Responses API verbosity override: low, medium, high |
#model_context_window | Context window tokens available to the active model |
#model_auto_compact_token_limit | Token threshold that triggers automatic history compaction |
#personality | Default communication style: none, friendly, pragmatic |
#service_tier | Preferred service tier for new turns
|
#oss_provider | Local provider used with --oss: lmstudio or ollama |
Approvals & sandbox
| Item | Description |
|---|---|
#approval_policy | When Codex pauses for approval: on-request or never
|
#approvals_reviewer | Who reviews eligible approval prompts: user or auto_review
|
#sandbox_mode | Sandbox policy: read-only, workspace-write, danger-full-access |
#sandbox_workspace_write.writable_roots | Extra directories writable in workspace-write mode |
#sandbox_workspace_write.network_access | Allow outbound network access inside the workspace-write sandbox |
#sandbox_workspace_write.exclude_slash_tmp / sandbox_workspace_write.exclude_tmpdir_env_var | Exclude /tmp from writable roots |
#default_permissions | Named permissions profile applied to sandboxed tool calls
|
#permissions.<name>.extends | Parent profile applied before this one
|
#windows.sandbox | Native Windows sandbox mode: unelevated or elevated |
#shell_environment_policy.inherit | Environment inheritance for subprocesses: all, core, none |
#allow_login_shell | Allow shell tools to use login-shell semantics; defaults to true |
#projects.<path>.trust_level | Trust level for a project path, which gates project-local config and hooks |
MCP servers
| Item | Description |
|---|---|
#mcp_servers.<id>.command / mcp_servers.<id>.args / mcp_servers.<id>.env | Launcher command for a stdio MCP server |
#mcp_servers.<id>.url | Endpoint for a streamable HTTP MCP server |
#mcp_servers.<id>.auth | Auth fallback for an HTTP MCP server: oauth or chatgpt
|
#mcp_servers.<id>.enabled | Disable a server without removing its configuration |
#mcp_servers.<id>.startup_timeout_sec / mcp_servers.<id>.tool_timeout_sec | Override the 10 s startup timeout |
Providers
| Item | Description |
|---|---|
#model_providers.<id>.base_url / model_providers.<id>.name | API base URL for a custom provider |
#model_providers.<id>.env_key | Environment variable supplying that provider’s API key |
#model_providers.<id>.wire_api | Protocol used by the provider; responses is the only supported value |
#openai_base_url | Base URL override for the built-in openai provider |
#forced_login_method | Restrict authentication to chatgpt or api |
TUI
| Item | Description |
|---|---|
#tui.notifications | Enable TUI notifications, optionally restricted to event types
|
#tui.theme | Syntax-highlighting theme override, in kebab-case |
#tui.status_line | Ordered footer status-line items; null disables the line |
#tui.animations | Enable welcome screen, shimmer and spinner animations |
#tui.resume_cwd | Directory used when resuming or forking: current or session |
#tui.vim_mode_default | Start the composer in Vim normal mode |
#tui.raw_output_mode | Start the TUI in raw scrollback mode |
Features, hooks & agents
| Item | Description |
|---|---|
#features.hooks | Enable lifecycle hooks from hooks.json or inline [hooks]
|
#features.apps | Enable app (connector) integrations; on by default
|
#agents.enabled | Enable multi-agent tools; defaults to true |
#agents.default_subagent_model / agents.default_subagent_reasoning_effort | Default model for spawned agents |
#agents.max_concurrent_threads_per_session | Cap on concurrent spawned-agent threads, excluding the primary thread |
#memories.use_memories / memories.generate_memories | Inject existing memories into future sessions |
#skills.max_context_tokens | Token budget for the available-skills catalog
|
Housekeeping
| Item | Description |
|---|---|
#instructions | Reserved — prefer model_instructions_file or AGENTS.md |
#developer_instructions | Extra developer instructions injected into the session |
#project_doc_max_bytes | Maximum bytes read from AGENTS.md when building project instructions
|
#project_root_markers | Filenames that mark a project root when walking parent directories |
#log_dir | Directory for log files; defaults to $CODEX_HOME/log
|
#sqlite_home | Directory for the SQLite-backed state DB used by agent jobs and resumable runs |
#file_opener | URI scheme for opening citations: vscode, vscode-insiders, windsurf, cursor, none |
#notify | Command invoked for notifications; receives a JSON payload |
#check_for_update_on_startup | Check for updates on startup |
#hide_agent_reasoning | Suppress reasoning events in the TUI and codex exec |
#tool_output_token_limit | Token budget for storing individual tool outputs in history |
#history.persistence / history.max_bytes | How prompt history is persisted |
Environment Variables
Locations
| Item | Description |
|---|---|
#CODEX_HOME | Root for config, auth, logs, sessions and skills; defaults to ~/.codex
|
#CODEX_SQLITE_HOME | Where SQLite-backed state is stored; defaults to CODEX_HOME
|
Authentication & network
| Item | Description |
|---|---|
#CODEX_API_KEY | API key for a non-interactive Codex process
|
#CODEX_ACCESS_TOKEN | ChatGPT or Codex access token for trusted automation
|
#CODEX_CA_CERTIFICATE | PEM CA bundle for corporate TLS interception or private roots
|
#SSL_CERT_FILE | Fallback PEM CA bundle path when CODEX_CA_CERTIFICATE is unset |
#OPENAI_FEDERATION_RULE_ID | Selects the workload-identity federation rule |
#OPENAI_IDENTITY_TOKEN_FILE | Absolute path to the current OIDC token or SPIFFE JWT-SVID |
#OPENAI_WORKLOAD_IDENTITY_CONTEXT | Bounded JSON identifiers for client-reported audit attribution
|
Installer & diagnostics
| Item | Description |
|---|---|
#CODEX_NON_INTERACTIVE | Skip installer prompts, using their defaults
|
#CODEX_INSTALL_DIR | Where the visible codex command is installed
|
#RUST_LOG | Log filtering and verbosity
|
Skills, Plugins & AGENTS.md
Skills
| Item | Description |
|---|---|
#/skills | Browse and use local skills from the TUI |
#SKILL.md | The file that defines a skill inside its folder |
#$CWD/.agents/skills | Repo-scoped skills; Codex scans every directory from the CWD up to the repo root
|
#$HOME/.agents/skills | User-scoped skills, available in every repository |
#/etc/codex/skills | Admin-scoped skills shared across a machine or container |
#skills.config | Per-skill enablement overrides
|
#~/.codex/prompts | Deprecated custom prompts — use skills instead
|
Plugins & marketplaces
| Item | Description |
|---|---|
#/plugins | Browse installed and discoverable plugins from the TUI |
#codex plugin add / codex plugin remove | Install a plugin from a configured or remote marketplace |
#marketplaces.<name>.source_type | Marketplace source kind: git or local
|
#plugins.<plugin>.enabled | Enable or disable a plugin, keyed plugin-name@marketplace-name
|
#plugins.<plugin>.mcp_servers.<server>.enabled_tools | Allow list of tools from a plugin-provided MCP server
|
AGENTS.md
| Item | Description |
|---|---|
#/init | Generate an AGENTS.md scaffold in the current directory |
#AGENTS.md | Project guidance, merged root-down so nearer files win
|
#AGENTS.override.md | Takes precedence over AGENTS.md in the same directory |
#project_doc_fallback_filenames | Extra filenames accepted when no AGENTS.md is found in a directory |
Subagents
| Item | Description |
|---|---|
#/agent / /subagents | Inspect or continue work in a spawned subagent thread |
#agents.<name>.description | Role guidance shown to Codex when choosing and spawning that agent type
|
#codex agents | Browse all agent sessions on the shared local app-server daemon |
Hooks, MCP & Sandbox
Hooks
| Item | Description |
|---|---|
#/hooks | View configured hooks, trust new or changed ones, disable non-managed hooks |
#hooks.json | Hook definitions next to an active config layer
|
#[hooks] | Inline hook tables in config.toml, using the same event schema as hooks.json |
#PreToolUse / PostToolUse / PermissionRequest | Lifecycle events you can hook
|
#hooks.<Event>[].hooks[].async | Run a command hook in the background without delaying the trigger
|
#hooks.<Event>[].hooks[].additionalContextLimit | Token threshold before oversized hook context is spilled to disk
|
#hooks.<Event>[].hooks[].commandWindows | Windows-only command override for a command hook
|
#--dangerously-bypass-hook-trust | Run enabled hooks without persisted trust for this invocation
|
MCP
| Item | Description |
|---|---|
#codex mcp add / codex mcp list / codex mcp get / codex mcp remove | Register an external MCP server |
#codex mcp login / codex mcp logout | Authenticate against an MCP server |
#mcp_oauth_callback_port / mcp_oauth_callback_url | Port for the MCP OAuth callback |
#mcp_optional_startup_grace_ms | Grace period before optional MCP servers are considered failed |
#codex app-server | The supported way to expose Codex to another client
|
Sandbox & exec policy
| Item | Description |
|---|---|
#read-only / workspace-write / danger-full-access | Sandbox modes for model-generated commands
|
#codex sandbox | Run any command under the same policy Codex uses internally
|
#codex execpolicy check --rules | Validate execpolicy rule files against a command before saving them
|
#~/.codex/rules | Conventional location for execpolicy rule files
|
No matches — clear search to see everything.