Verified
New since your last visit
Unverified

Keyboard & TUI

Composer

ItemDescription
#!Prefix a line to run a shell command under current approval and sandbox settings
#Up / DownRestore draft history
#Ctrl RSearch prompt history — Enter uses a match, Esc cancels
#Ctrl OCopy the latest completed Codex output
#Ctrl GOpen the composer in $VISUAL, or $EDITOR when unset
#Esc EscEdit the previous user message and fork the chat from that point
#Ctrl CClose the session (same as /exit)

While Codex is working

ItemDescription
#TabQueue a follow-up prompt, slash command or shell command for the next turn
#EnterInject new instructions into the current turn

Appearance & bindings

ItemDescription
#/keymapInspect, remap and persist TUI shortcut bindings
#tui.keymap.<context>.<action>Bind a TUI action; an empty array unbinds it
#/themePreview and persist a syntax-highlighting theme
#/vimToggle Vim normal/insert behaviour in the composer
#/rawToggle raw scrollback for copy-friendly terminal selection
#/statuslinePick and reorder TUI footer items
#/titlePick and reorder terminal window/tab title items
#codex completion zshGenerate a shell completion script (bash, zsh, fish, powershell)
#--no-alt-screenRun the TUI inline, preserving terminal scrollback

Slash Commands (Core)

Model & behaviour

ItemDescription
#/modelChoose the active model, and reasoning effort where available
#/fastToggle the current model’s Fast service tier and persist it
#/personalityPick a communication style for responses
#/planSwitch to plan mode, optionally with a prompt
#/goalSet, edit, pause, resume, view or clear a persistent task goal

Permissions & review

ItemDescription
#/permissionsSet what Codex may do without asking first
#/approveApprove one retry of a recent auto-review denial
#/reviewAsk Codex to review your working tree
#/diffShow the Git diff, including files Git is not tracking yet

Session lifecycle

ItemDescription
#/newStart a new chat inside the same CLI session
#/clearClear the terminal and start a fresh chat together
#/renameRename the current chat
#/resumeResume a saved chat from your session list
#/forkFork the current chat into a new chat
#/side / /btwStart an ephemeral side chat
#/archiveArchive the current session and exit
#/deletePermanently delete the current session and exit
#/quit / /exitExit the CLI

Context & output

ItemDescription
#/compactSummarise the visible chat to free tokens
#/mentionAttach a file or folder to the chat
#/copyCopy the latest completed Codex output
#/ideInclude open files, selection and other IDE context
#/appContinue the current session in the ChatGPT desktop app (macOS, Windows)
#/statusShow session configuration and token usage

Background terminals

ItemDescription
#/psShow background terminals and their recent output
#/stopStop all background terminals started by this session

Slash Commands (Tools)

Extensibility

ItemDescription
#/skillsBrowse and use local skills
#/pluginsBrowse installed and discoverable plugins
#/hooksView, trust and manage lifecycle hooks
#/mcpList configured MCP tools
#/appsBrowse apps (connectors) and insert them into your prompt
#/agent / /subagentsSwitch the active agent thread
#/memoriesTurn memory injection or memory generation on or off
#/initGenerate an AGENTS.md scaffold in the current directory
#/importImport Claude Code or Cursor setup, projects and chats
#/experimentalToggle experimental features such as network proxy or prevent-sleep

Sandbox helpers (Windows)

ItemDescription
#/setup-default-sandboxSet up the elevated agent sandbox
#/sandbox-add-read-dirGrant sandbox read access to an extra absolute directory

Account & diagnostics

ItemDescription
#/usageView account token usage or a rate-limit reset
#/debug-configPrint config layer and requirements diagnostics
#/feedbackSend logs to the Codex maintainers
#/logoutSign out of Codex
#/pets / /petChoose or hide an ambient terminal pet

CLI & Subcommands

Global flags

ItemDescription
#-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
#--worktreeRun the session in a new managed Git worktree
#-i, --image <FILE>Attach one or more images to the initial prompt
#--ossUse 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-configFail when config.toml has keys this version does not recognise
#--approve-for-meRoute approval requests through automatic review using the workspace-write sandbox
#--dangerously-bypass-approvals-and-sandboxSkip every prompt and run unsandboxed
#--dangerously-bypass-hook-trustRun 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, --helpPrint the version

Sessions & threads

ItemDescription
#codex resumeResume a previous interactive session; picker by default
#codex forkFork a previous session into a new one; picker by default
#codex queueQueue a message for an existing session
#codex archiveArchive a saved session by id or name
#codex unarchiveRestore an archived session
#codex deletePermanently delete a saved session by id or name
#codex agentsBrowse all agent sessions on the shared local app-server daemon
#codex migrate-rolloutsInspect or migrate legacy local sessions to paginated thread history

Run & review

ItemDescription
#codex exec / codex eRun Codex non-interactively
#codex reviewRun a code review non-interactively
#codex apply / codex aApply the agent’s latest diff to your working tree with git apply

Auth

ItemDescription
#codex loginAuthenticate with a ChatGPT account, API key or access token
#codex logoutRemove stored authentication credentials

MCP & plugins

ItemDescription
#codex mcpManage external MCP servers
#codex pluginManage Codex plugins

Sandbox & policy

ItemDescription
#codex sandboxRun a command under the same sandbox policy Codex uses internally
#codex execpolicy checkValidate execpolicy rule files against a command

Diagnostics & maintenance

ItemDescription
#codex doctorDiagnose the local installation, config, auth and runtime health
#codex featuresInspect feature flags
#codex debugDebugging tools
#codex updateUpdate the CLI when the installed release supports self-update
#codex completionGenerate a shell completion script
#codex cloudBrowse Codex Cloud tasks and apply changes locally
#codex app-serverRun the app server or related tooling
#codex remote-controlManage the app-server daemon with remote control enabled
#codex exec-serverRun the standalone exec-server service
#codex mcp-serverRemoved in v0.154.0 — use the Codex app server instead

Settings (config.toml)

Files & precedence

ItemDescription
#~/.codex/config.tomlUser-level configuration; the root is $CODEX_HOME
#$CODEX_HOME/<name>.config.tomlA config profile layer, selected with --profile <name>
#requirements.tomlAdministrator-managed policy layer

Model

ItemDescription
#modelModel to use
#review_modelModel override used by /review; defaults to the session model
#model_providerProvider id from model_providers; defaults to openai
#model_reasoning_effortReasoning effort: minimal, low, medium, high, xhigh
#plan_mode_reasoning_effortReasoning effort used while in plan mode
#model_reasoning_summarySummary detail: auto, concise, detailed, none
#model_verbosityGPT-5 Responses API verbosity override: low, medium, high
#model_context_windowContext window tokens available to the active model
#model_auto_compact_token_limitToken threshold that triggers automatic history compaction
#personalityDefault communication style: none, friendly, pragmatic
#service_tierPreferred service tier for new turns
#oss_providerLocal provider used with --oss: lmstudio or ollama

Approvals & sandbox

ItemDescription
#approval_policyWhen Codex pauses for approval: on-request or never
#approvals_reviewerWho reviews eligible approval prompts: user or auto_review
#sandbox_modeSandbox policy: read-only, workspace-write, danger-full-access
#sandbox_workspace_write.writable_rootsExtra directories writable in workspace-write mode
#sandbox_workspace_write.network_accessAllow outbound network access inside the workspace-write sandbox
#sandbox_workspace_write.exclude_slash_tmp / sandbox_workspace_write.exclude_tmpdir_env_varExclude /tmp from writable roots
#default_permissionsNamed permissions profile applied to sandboxed tool calls
#permissions.<name>.extendsParent profile applied before this one
#windows.sandboxNative Windows sandbox mode: unelevated or elevated
#shell_environment_policy.inheritEnvironment inheritance for subprocesses: all, core, none
#allow_login_shellAllow shell tools to use login-shell semantics; defaults to true
#projects.<path>.trust_levelTrust level for a project path, which gates project-local config and hooks

MCP servers

ItemDescription
#mcp_servers.<id>.command / mcp_servers.<id>.args / mcp_servers.<id>.envLauncher command for a stdio MCP server
#mcp_servers.<id>.urlEndpoint for a streamable HTTP MCP server
#mcp_servers.<id>.authAuth fallback for an HTTP MCP server: oauth or chatgpt
#mcp_servers.<id>.enabledDisable a server without removing its configuration
#mcp_servers.<id>.startup_timeout_sec / mcp_servers.<id>.tool_timeout_secOverride the 10 s startup timeout

Providers

ItemDescription
#model_providers.<id>.base_url / model_providers.<id>.nameAPI base URL for a custom provider
#model_providers.<id>.env_keyEnvironment variable supplying that provider’s API key
#model_providers.<id>.wire_apiProtocol used by the provider; responses is the only supported value
#openai_base_urlBase URL override for the built-in openai provider
#forced_login_methodRestrict authentication to chatgpt or api

TUI

ItemDescription
#tui.notificationsEnable TUI notifications, optionally restricted to event types
#tui.themeSyntax-highlighting theme override, in kebab-case
#tui.status_lineOrdered footer status-line items; null disables the line
#tui.animationsEnable welcome screen, shimmer and spinner animations
#tui.resume_cwdDirectory used when resuming or forking: current or session
#tui.vim_mode_defaultStart the composer in Vim normal mode
#tui.raw_output_modeStart the TUI in raw scrollback mode

Features, hooks & agents

ItemDescription
#features.hooksEnable lifecycle hooks from hooks.json or inline [hooks]
#features.appsEnable app (connector) integrations; on by default
#agents.enabledEnable multi-agent tools; defaults to true
#agents.default_subagent_model / agents.default_subagent_reasoning_effortDefault model for spawned agents
#agents.max_concurrent_threads_per_sessionCap on concurrent spawned-agent threads, excluding the primary thread
#memories.use_memories / memories.generate_memoriesInject existing memories into future sessions
#skills.max_context_tokensToken budget for the available-skills catalog

Housekeeping

ItemDescription
#instructionsReserved — prefer model_instructions_file or AGENTS.md
#developer_instructionsExtra developer instructions injected into the session
#project_doc_max_bytesMaximum bytes read from AGENTS.md when building project instructions
#project_root_markersFilenames that mark a project root when walking parent directories
#log_dirDirectory for log files; defaults to $CODEX_HOME/log
#sqlite_homeDirectory for the SQLite-backed state DB used by agent jobs and resumable runs
#file_openerURI scheme for opening citations: vscode, vscode-insiders, windsurf, cursor, none
#notifyCommand invoked for notifications; receives a JSON payload
#check_for_update_on_startupCheck for updates on startup
#hide_agent_reasoningSuppress reasoning events in the TUI and codex exec
#tool_output_token_limitToken budget for storing individual tool outputs in history
#history.persistence / history.max_bytesHow prompt history is persisted

Environment Variables

Locations

ItemDescription
#CODEX_HOMERoot for config, auth, logs, sessions and skills; defaults to ~/.codex
#CODEX_SQLITE_HOMEWhere SQLite-backed state is stored; defaults to CODEX_HOME

Authentication & network

ItemDescription
#CODEX_API_KEYAPI key for a non-interactive Codex process
#CODEX_ACCESS_TOKENChatGPT or Codex access token for trusted automation
#CODEX_CA_CERTIFICATEPEM CA bundle for corporate TLS interception or private roots
#SSL_CERT_FILEFallback PEM CA bundle path when CODEX_CA_CERTIFICATE is unset
#OPENAI_FEDERATION_RULE_IDSelects the workload-identity federation rule
#OPENAI_IDENTITY_TOKEN_FILEAbsolute path to the current OIDC token or SPIFFE JWT-SVID
#OPENAI_WORKLOAD_IDENTITY_CONTEXTBounded JSON identifiers for client-reported audit attribution

Installer & diagnostics

ItemDescription
#CODEX_NON_INTERACTIVESkip installer prompts, using their defaults
#CODEX_INSTALL_DIRWhere the visible codex command is installed
#RUST_LOGLog filtering and verbosity

Skills, Plugins & AGENTS.md

Skills

ItemDescription
#/skillsBrowse and use local skills from the TUI
#SKILL.mdThe file that defines a skill inside its folder
#$CWD/.agents/skillsRepo-scoped skills; Codex scans every directory from the CWD up to the repo root
#$HOME/.agents/skillsUser-scoped skills, available in every repository
#/etc/codex/skillsAdmin-scoped skills shared across a machine or container
#skills.configPer-skill enablement overrides
#~/.codex/promptsDeprecated custom prompts — use skills instead

Plugins & marketplaces

ItemDescription
#/pluginsBrowse installed and discoverable plugins from the TUI
#codex plugin add / codex plugin removeInstall a plugin from a configured or remote marketplace
#marketplaces.<name>.source_typeMarketplace source kind: git or local
#plugins.<plugin>.enabledEnable or disable a plugin, keyed plugin-name@marketplace-name
#plugins.<plugin>.mcp_servers.<server>.enabled_toolsAllow list of tools from a plugin-provided MCP server

AGENTS.md

ItemDescription
#/initGenerate an AGENTS.md scaffold in the current directory
#AGENTS.mdProject guidance, merged root-down so nearer files win
#AGENTS.override.mdTakes precedence over AGENTS.md in the same directory
#project_doc_fallback_filenamesExtra filenames accepted when no AGENTS.md is found in a directory

Subagents

ItemDescription
#/agent / /subagentsInspect or continue work in a spawned subagent thread
#agents.<name>.descriptionRole guidance shown to Codex when choosing and spawning that agent type
#codex agentsBrowse all agent sessions on the shared local app-server daemon

Hooks, MCP & Sandbox

Hooks

ItemDescription
#/hooksView configured hooks, trust new or changed ones, disable non-managed hooks
#hooks.jsonHook definitions next to an active config layer
#[hooks]Inline hook tables in config.toml, using the same event schema as hooks.json
#PreToolUse / PostToolUse / PermissionRequestLifecycle events you can hook
#hooks.<Event>[].hooks[].asyncRun a command hook in the background without delaying the trigger
#hooks.<Event>[].hooks[].additionalContextLimitToken threshold before oversized hook context is spilled to disk
#hooks.<Event>[].hooks[].commandWindowsWindows-only command override for a command hook
#--dangerously-bypass-hook-trustRun enabled hooks without persisted trust for this invocation

MCP

ItemDescription
#codex mcp add / codex mcp list / codex mcp get / codex mcp removeRegister an external MCP server
#codex mcp login / codex mcp logoutAuthenticate against an MCP server
#mcp_oauth_callback_port / mcp_oauth_callback_urlPort for the MCP OAuth callback
#mcp_optional_startup_grace_msGrace period before optional MCP servers are considered failed
#codex app-serverThe supported way to expose Codex to another client

Sandbox & exec policy

ItemDescription
#read-only / workspace-write / danger-full-accessSandbox modes for model-generated commands
#codex sandboxRun any command under the same policy Codex uses internally
#codex execpolicy check --rulesValidate execpolicy rule files against a command before saving them
#~/.codex/rulesConventional location for execpolicy rule files
No matches — clear search to see everything.