Add compact handoff command with copyable context
What version of Codex CLI is running?
codex-cli 0.129.0
What subscription do you have?
Enterprise
Which model were you using?
gpt-5.5
What platform is your computer?
Darwin 25.4.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty
What issue are you seeing?
The issue is that /compact helps reduce context in the current chat, but there isn’t a built-in way to export that
compacted handoff context for a new chat.
So users who want to move to a clean thread have to manually ask for a summary, copy it, and hope it includes enough
state: repo/worktree context, goals, decisions, files touched, commands run, validation, and unresolved questions.
That manual handoff is easy to make incomplete, and it can also let old tasks accidentally continue in the new chat
without a clear boundary.
What steps can reproduce the bug?
Uploaded thread: 019e062e-d47d-7743-bf76-e0bf005579a9
- Work in a long Codex chat with active repo context, decisions, files touched, and validation history.
- Run /compact to reduce the current conversation context.
- Try to start a new chat while preserving the same compacted handoff context.
- Look for an option to copy the compacted summary or start a new chat from it.
Expected: there is a copyable/exportable compacted handoff summary.
Actual: there is no built-in copy/export flow, so the user must manually ask for a summary and copy it themselves.
What is the expected behavior?
Running a command like /compact-copy, /compact --copy, or /handoff should generate the same structured handoff
summary used by /compact and make it easy to reuse in a new chat.
It should include repo/worktree context, active goals, decisions made, files touched, commands run, validation
status, unresolved questions, and a clear boundary that old tasks should not continue automatically in the new chat.
Ideally it would copy to clipboard, show a copyable panel, or offer a “Start new chat with this context” button.
Additional information
This is mainly a workflow/friction issue, not a correctness bug. It would be especially useful for long coding
sessions, repo maintenance work, and cases where users want a clean thread without losing project state.
A good handoff should also avoid carrying over stale intent: it should clearly separate completed work from
unresolved next steps so the new chat does not continue old tasks automatically.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗