Codex Advanced Tips
This chapter collects practical techniques for larger or more complex Codex work.
1. Manage The Context Window
Keep the active context focused. Link to files and references that matter, and avoid dumping unrelated material.
2. Checkpoints And Undo
Use Git commits, app checkpoints, or small reviewable steps before risky edits.
3. Resume And Fork Sessions (CLI)
Resume a previous session when continuing the same work. Fork when you want an alternate approach without losing the original thread.
4. @ Mentions And Images
Use @ mentions to attach relevant files, screenshots, connectors, or context sources.
5. Memories
Durable preferences belong in project or user instructions, not repeated in every prompt.
6. Parallel Work
Run independent investigations, reviews, or implementation paths in separate threads or worktrees.
7. Debug Agent Behavior
When Codex behaves unexpectedly, inspect loaded instructions, permissions, logs, and recent tool output.
8. Make It Think Before Acting
For risky tasks, ask Codex to inspect and summarize before editing. This is especially useful in unfamiliar repos.
9. Save Time And Cost
Use smaller models and lower effort for routine work. Reserve stronger settings for tasks that need deeper reasoning.
Next Steps
Continue with IDE Extension.