Thread Lifecycle
Manage Codex sessions across start, resume, fork, compact, archive, delete, and handoff.
Key takeaways
- Long-running work needs thread hygiene; without lifecycle rules a session accumulates stale assumptions, duplicated plans, and unclear ownership.
- Know the lifecycle actions: Start for clean context, Resume after interruption, Fork to explore a variant, Compact to reduce context load, Archive for recoverable cleanup, Delete for permanent transcript removal, and Stop to summarize final state.
- In the 0.142.0-era baseline, check
/usagebefore long goals, scheduled reminders, or broad multi-agent delegation. - In 0.145.0–0.146.0, use paginated history, persisted names/search, pins, named
/newor/clear, side-conversation switching, and paginated forks to keep large thread catalogs navigable. - Make handoffs explicit with current goal and acceptance criteria, files changed, commands already run and their results, known blockers, and the next safe action.
- If the thread no longer reflects actual repository state, stop and re-ground from files and git status before continuing.
Long-running work needs thread hygiene. Without lifecycle rules, the session accumulates stale assumptions, duplicated plans, and unclear ownership.
Lifecycle Actions
| Action | Use |
|---|---|
| Start | New task with clean context |
| Resume | Continue the same task after interruption |
| Fork | Explore a variant without disturbing the main path |
| Compact | Preserve useful state while reducing context load |
| Archive | Remove a completed or abandoned session from active lists while keeping it recoverable |
| Delete | Permanently remove the transcript and spawned descendant sessions |
| Stop | End a task and summarize final state |
0.140.0 to 0.142.0 Lifecycle Notes
/deleteandcodex delete <SESSION>permanently remove the transcript and spawned descendant sessions. Use/archivefor recoverable cleanup./importcan bring supported Claude Code setup, project files, and recent chats into Codex. After import, inspect/diff,/debug-config, and/status./usage daily|weekly|cumulativeshould precede long/goalsessions, scheduled reminders, and multi-agent delegation so token budgets are visible before work expands.
0.145.0 to 0.146.0 Lifecycle Notes
- Experimental paginated history resumes and searches large catalogs without loading every thread, while preserving names and supporting subagent and memory metadata.
/new [name]and/clear [name]name a fresh thread immediately; pin important threads and switch side conversations without closing them.- Forks can use paginated history, and ephemeral forks stay out of normal history lists.
- After replay, import, or fork, verify preservation of messages, final responses, errors, timestamps, and approval settings.
Handoff Checklist
- Current goal and acceptance criteria.
- Files changed or expected to change.
- Commands already run and their results.
- Known blockers or open questions.
- Next safe action.
Failure Mode
If the thread no longer reflects the actual repository state, stop and re-ground from files and git status before continuing.