Add compact handoff command with copyable context

Resolved 💬 4 comments Opened May 8, 2026 by andreas-ekman-wcar Closed Jul 1, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

  1. Work in a long Codex chat with active repo context, decisions, files touched, and validation history.
  2. Run /compact to reduce the current conversation context.
  3. Try to start a new chat while preserving the same compacted handoff context.
  4. 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.

View original on GitHub ↗

4 Comments

andreas-ekman-wcar · 3 months ago

Related to #21468, but this request is specifically about a handoff/export flow for starting a new chat: generate a copyable summary with repo/worktree state, completed work, unresolved next steps, validation status, and an explicit boundary that the new chat should not automatically continue stale tasks.

It also overlaps conceptually with #10336, but the goal here is not only to expose the compacted summary in the current thread; it is to make that summary reusable as a clean handoff into a new chat.

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #21468

Powered by Codex Action

andreas-ekman-wcar · 3 months ago

Thanks, I reviewed #21468. This is related but not intended as the same request.

#21468 focuses on making /compact more visible/controllable inside the current session, including preview, transcript visibility, export, and prompt-guided compaction.

This issue is specifically about a new-chat handoff workflow: generating a copyable context packet that includes repo/worktree state, completed work, unresolved next steps, validation status, and an explicit boundary that the new chat should not automatically continue stale tasks.

etraut-openai contributor · 1 month ago

This feature request hasn't received enough upvotes, so it is being closed automatically. If you still feel this feature is needed, please open a new feature request with an updated title and description.