Codex

Command reference

CLI startup, subcommands, slash commands, session recovery, permissions and configuration overrides.

This is a quick reference for startup commands, subcommands, interactive slash commands and temporary configuration overrides. The / menu in your installed version is authoritative.

The base URL is https://passion8.cc/v1, including /v1. See CLI configuration.

#Startup and subcommands

CommandPurpose
codexOpen the interactive TUI
codex "Explain this project"Start with an initial prompt
codex exec "..."Run non-interactively and exit; useful for scripts and CI
codex app [PATH]Launch the desktop client; open a workspace on supported platforms
codex app-serverStart the protocol server for desktop, remote or integration work
codex apply <TASK_ID>Apply a Codex Cloud task's diff locally
codex cloudBrowse or submit Codex Cloud tasks
codex resumeSelect a saved session
codex resume --lastResume the latest session
codex forkFork a saved conversation
codex archive / codex unarchiveArchive or restore sessions
codex deletePermanently delete a session
codex doctorDiagnose installation, configuration, authentication, Git and terminal setup
codex featuresInspect and persistently enable/disable feature flags
codex login / codex logoutManage client authentication; not required before the Passion8 file setup
codex --profile <name>Start with a named profile
codex --model <name>Select a model for this run
codex -C <directory>Select the working directory
codex mcpManage MCP servers
codex mcp-serverExpose Codex as an MCP server
codex pluginManage plugins
codex plugin marketplaceManage plugin marketplaces
codex remote-controlPrepare the local app-server daemon for remote control
codex sandboxExecute a command in a Codex sandbox
codex updateCheck for and apply CLI updates
codex --versionShow the version

#Overrides and permission flags

Override settings for one run without editing config.toml:

FlagPurpose
-c key=valueOverride a setting, such as -c model_reasoning_effort=high
-a / --ask-for-approval <policy>Set approval policy: on-request / never
-s / --sandbox <mode>read-only / workspace-write / danger-full-access
--add-dir <path>Grant access to an additional directory; repeat as needed
--image <path[,path...]>Attach images to the initial prompt
--ossUse a local open-source provider, typically requiring a running local service
--remote <url>Connect to a remote app-server using supported transports
--remote-auth-token-env <ENV>Read the remote bearer token from an environment variable
--searchEnable live web search instead of the normal cached mode
--strict-configReject unrecognized configuration fields
--full-autoDeprecated compatibility flag; use explicit sandbox and approval settings
--dangerously-bypass-approvals-and-sandboxBypass boundaries; only for controlled, recoverable environments

Do not use unrestricted execution as a default in unfamiliar repositories, production directories or directories containing secrets. See Security.

#Interactive slash commands

Enter / in the TUI to open its command menu:

CommandPurpose
/modelChange model and reasoning effort
/fastSelect Fast service tier when the model catalog supports it
/personalityChange communication style: friendly, pragmatic or none
/permissionsChange approval and permission mode
/approveApprove a retry of the last action rejected by automatic review
/planEnter planning mode, optionally with an inline prompt
/goalSet, inspect, pause, resume or clear a goal
/initGenerate an initial AGENTS.md
/diffInspect the current Git diff
/reviewReview the working tree
/mentionAttach a file using @
/compactCompact the context of a long conversation
/clearClear the display and start a new conversation
/newStart a new conversation in the same CLI session
/statusInspect session status and configuration
/usageInspect account usage or rate-limit reset information
/mcpInspect connected MCP servers and tools
/ideInclude open-file/selection context from the IDE
/agentSwitch to or inspect a spawned agent thread
/psInspect background terminals and recent output
/stopStop background terminals in the current session
/forkFork the current conversation
/side / /btwOpen a side conversation without interrupting the main transcript
/rawToggle raw scrollback for copying long output
/resumeResume from the session list
/archiveArchive the current session and exit
/deletePermanently delete the current session and exit
/appsBrowse connectors/apps and insert an app reference
/pluginsBrowse, install and manage plugins
/hooksInspect lifecycle hooks
/skillsBrowse and use skills
/memoriesConfigure memory use and generation
/importImport supported Claude Code setup, project files or recent chats
/debug-configInspect configuration layers and requirements
/statuslineConfigure footer fields
/titleConfigure terminal-window/tab title fields
/themeSelect syntax highlighting
/keymapInspect and save key mappings
/vimToggle Vim-style composition
/logoutClear local credentials
/feedbackSend feedback and logs to maintainers

Commands change by version. Use the current menu; typing @ also searches and references files.

#Resume a saved session

Continue without repeating all background information:

codex resume          # Select a session
codex resume --last   # Resume the latest

#Continue reading

#Official references

Support

Need help?

For setup, billing, or model issues, email us. Check the status page for uptime.

WeChat / QQ support is available at the bottom right.