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.