Skip to main content
reopt Handbook
reopt Handbook
Codex Command MasterLabels and command selectionHow to read a detail guideComplete command listTerminal CLI Commands and Options

Task guides

Core Command GroupSession Command GroupCustom Command GuideMCP Command and Integration GuideDesign Workflows

Conversation and context

Cmd. /clearCmd. /renameCmd. /archiveCmd. /deleteCmd. /compactCmd. /copyCmd. /memoriesCmd. /importCmd. /initCmd. /mentionCmd. /forkCmd. /sideCmd. /resumeCmd. /newCmd. /cdCmd. /exportCmd. /recap

Planning and execution

Cmd. /planCmd. /goalCmd. /psCmd. /stopCmd. /app

Review and verification

Cmd. /review

Models and settings

Cmd. /modelCmd. /fast

Permissions and integrations

Cmd. /permissionsCmd. /ideCmd. /setup-default-sandboxCmd. /sandbox-add-read-dirCmd. /pluginsCmd. /hooksCmd. /approveCmd. /skillsCmd. /mcp

Status and diagnostics

Cmd. /agentCmd. /appsCmd. /diffCmd. /feedbackCmd. /personalityCmd. /rawCmd. /statusCmd. /debug-configCmd. /title

Display and input

Cmd. /keymapCmd. /vimCmd. /experimentalCmd. /statuslineCmd. /themeCmd. /petsCmd. /voiceCmd. /worktree

Account and usage

Cmd. /exitCmd. /logoutCmd. /quitCmd. /usage

Legacy

Cmd. /approvals

Verification and history

Current verification scopeHandbook updatesRelease coverage historyEarlier verification recordsCommand change history
Handbook›Codex Command Master›Cmd. /compact
한국어English

Cmd. /compact

Summarize a long conversation to free context.

Key takeaways

  • Summarize a long conversation to free context.
  • Check the input surface and availability before using the examples below.

Purpose

Summarize a long conversation to free context.

/compact

Availability

FieldValue
Input surfaceRunning CLI prompt
KindBuilt-in
StatusCurrent reference
Aliases—
Documented minimumNot specified
Reviewed against2026-09-22 · Codex CLI 0.155.1

The installed command menu and account or organization settings determine availability.

Examples

/compact

When to use it

  1. Compact after a long investigation before moving into implementation.
  2. Compact before handing a session to another teammate, then run /status.

Choosing related commands

CommandDifferenceChoose It When
/compactSummarizes long transcript contextThe session is long but still useful
/clearClears and starts a fresh chatYou want a true reset
/newStarts a new conversationYou want a new task in the same CLI

Effects and persistence

Replaces older conversation context with a summary. Identify decisions and constraints that must survive before compacting.

/compact summarizes the visible conversation so Codex can keep the critical points without overloading the context window.

Cautions

  • Review the summary if the task contains subtle requirements.
  • Do not compact away unresolved blockers, IDs, test results, or acceptance criteria.

Official sources

  • Developer Commands
  • Cli

Complete command list · Verification scope · History for this command

Related docs

Cmd. /compact

Claude Code Command Master · Summarize the current conversation to free context.

Cmd. /new

Start a new conversation inside the current CLI session.

Cmd. /clear

Clear the terminal and current chat context, then start a fresh Codex chat.

Core command basics

Claude Code Command Master · Read help and session status, start a fresh conversation, and exit or detach from Claude Code.

Cmd. /export

Claude Code Command Master · Copy or save the current conversation as plain text.

Cmd. /delete

Permanently delete the current Codex session transcript and spawned descendant sessions.

Cmd. /copy

Pick a whole Codex response, code block, or blockquote and copy it as Markdown.

On this page

PurposeAvailabilityExamplesWhen to use itChoosing related commandsEffects and persistenceCautionsOfficial sources