Context & Session Recovery in AI

From the OpenAI Codex cheat sheet ยท Troubleshooting ยท verified Jul 2026

Context & Session Recovery

Choose the least disruptive way to recover a long session.

text
# Preserve the current chat but free context
/compact

# Start a new chat and keep the terminal view
/new

# Clear the terminal and start a new chat
/clear

# Continue a saved chat
/resume

# Branch the current approach
/fork
๐Ÿ“Œ /compact is the least disruptive context reset
๐Ÿ’ก /new keeps the visible terminal history
๐Ÿงน /clear resets both the chat and visible terminal
๐Ÿ”€ /fork is safest for exploring a competing approach
commandscontextrecoverysessions

Continue with OpenAI Codex

Save the full cheat sheet or work through every related task.

More AI tasks

Back to the full OpenAI Codex cheat sheet