Codex commands, plugins and hidden features
OpenAI's Codex coding agent: CLI commands, flags, AGENTS.md and cloud tasks.
Commands
Slash commands and CLI commands
/goalSets, edits, pauses or clears a persistent goal./planMakes a plan before any implementation./reviewReviews code in your working tree or against a base branch./statusShows the model, approval policy, writable paths and token usage./initCreates an AGENTS.md template./mcpLists the configured MCP tools./modelChooses the model./fastChooses the fast service tier./reasoningChooses the reasoning effort./compactSummarizes the conversation to free up context./permissionsChanges what Codex can do without asking for approval./approveRetries once an action that auto-review denied./diffShows the git diff, including untracked files./copyCopies the last output./newStarts a new chat./clearResets the conversation./resumeOpens a saved chat./forkBranches off from the current conversation./sideOpens a temporary side conversation that does not disturb the main one./skillsLists and uses skills./pluginsManages plugins./appsShows the connected apps./mentionAttaches a file./hooksShows the hooks./agentsOpens the agent command center./subagentsSwitches between subagent threads./psLists background terminals./stopStops background terminals./cloudSwitches to cloud execution./localSwitches to local execution./cloud-environmentChooses the cloud execution environment./worktreeCreates a new git worktree for isolated work./memoriesSets whether this chat uses or creates memories./petShows the desktop pet.New 2026-09/usageShows your usage./renameRenames the chat./archiveArchives the chat./deleteDeletes the chat./pinPins the chat./feedbackSends feedback./statuslineConfigures the status line./titleSets the screen title./themeChanges the theme./keymapSets up key mappings./tuiSets the display mode.
Features
Built-in features worth knowing
Custom prompts /prompts:name and skills $Calls up your saved prompts and skills.Codex CloudRuns coding tasks in isolated workspaces from desktop, web and mobile.New 2026-09Code Review in CodexView PR summaries, diffs and discussions in Codex.New 2026-09Codex Security CloudRuns security scans on GitHub repositories on demand or on a schedule.New 2026-09Composer predictionsPredicts your next message so you can accept it with Tab. It is in beta.New 2026-10GPT-6.1 Sol / Terra, Astra UltrafastThe models used in Work and Codex.New 2026-09IDE extension (VS Code)The extension for use in your IDE. It supports the commands /approve /cloud /local /compact /fast /fork /goal /ide-context /init /mcp /memories /model /personality /plan /project /reasoning /review /side /status /worktree.
Tips
Things most people find out late
codex execRuns once without a conversation. The review, resume and fork subcommands work the same way.codex cloud / applyViews cloud tasks and applies the resulting diff locally.codex doctor / features / sandbox / mcp / pluginManages diagnostics, feature flags, sandbox runs, MCP, and plugins and marketplaces.codex agents / queue / remote-controlOpens the agent center, queues a message to an existing session, and controls Codex remotely. Remote control is experimental.