promptgarten 🌱
🌍 ES

Command reference · Codex CLI

/compact

Compacts the current chat’s context.

Compacts the current chat’s context to free space in the context window. Codex replaces the prior history with a compact summary so the session can continue without dropping older messages.

🔄 THE SAME TASK (“COMPACT CONTEXT”) ON OTHER PLATFORMS

Compare all 28 tasks

WHEN TO USE IT?

Make room in a long chat without starting over

/compact

WHEN NOT TO?

The chat is still short

compacting costs detail; while there is enough free context it gains nothing.

Better: just keep working

SOURCES

Share:𝕏in💬