Codex CLIcontext-managementbuilt-in

/compact

Summarize the visible conversation to free tokens. Use after long runs so Codex retains key points without blowing the context window.

When to use

  • Long coding sessions before starting a new sub-task
  • When Codex responses start degrading from context saturation
  • Freeing context window without starting a whole new session

More Codex CLI commands