Git-native conversation branches that can merge back into parent threads
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
App (project-backed workflow)
What feature would you like to see?
Codex should support first-class conversation branches that can be literally merged back into their parent conversation after work is complete.
Today, I can fork a conversation and work in the fork, but there is no durable, reviewable way to bring the useful result back into the original conversation. That leaves me manually summarizing, copying prompts, or asking the parent task to reconstruct what happened. Context, decisions, test evidence, and unresolved questions get lost or reinterpreted.
For Codex projects, the most straightforward model is Git-native conversation storage:
- Store project conversations as a versioned, structured artifact inside the project repository (opt-in, with a clear privacy control).
- Branching a conversation creates a Git branch from the exact conversation state, alongside its associated worktree when code changes are involved.
- Work normally in that branch. The conversation history, decisions, tool evidence, and code changes advance together.
- When ready, Codex offers a conversation merge into the original thread: preview the conversational/context diff and the code diff, resolve conflicts explicitly, then merge.
- The parent thread receives a durable merge commit/marker that preserves provenance and makes the imported decisions and evidence inspectable.
- Keep a safe escape hatch: users can merge only selected conversation turns/decision records, only code, or discard the branch.
The benefit is that conversation state becomes as reviewable and reversible as code. It would make exploration safe: create a branch for a risky implementation or architectural detour, then merge the verified result back into the main conversation without losing the causal history.
This is intentionally different from context-only session import (for example, #29031). The requested behavior is a true project-local, Git-backed branch-and-merge workflow where conversation state and repository state have aligned provenance.
Acceptance criteria
- From a project conversation, I can create a named conversation branch from any selected turn.
- I can work in that branch without altering the parent conversation or its workspace state.
- I can review both conversation/context changes and code changes before merging.
- Merging creates an auditable parent-thread record linked to the source branch and exact Git revision.
- Conflicts are surfaced and resolved explicitly; nothing silently overwrites parent context or files.
- Conversation persistence is opt-in and supports excluding sensitive turns, credentials, and tool output by default.
Additional information
Related but incomplete requests: #12450 covers chat-tree branching; #22100 covers file-state-safe branching; #29031 proposes context-only session import. This request connects those ideas through an actual Git-backed conversation lifecycle.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue identifies no files, tests, or entry points to begin with. First map the existing project conversation, fork, workspace, and persistence implementations, then determine where a Git-backed branch and merge lifecycle would fit. Done means the listed acceptance criteria are implemented, including reviewable context and code changes, explicit conflict handling, provenance, and opt-in privacy controls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- developer-experience, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100