Skip to content

Add managed worktree creation to TUI session commands - #43120

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/d6c83e00217660aacf2a6d92acad50b506607e0b
Sep 5, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/d6c83e00217660aacf2a6d92acad50b506607e0b

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Add managed worktree creation to TUI session commands

What changed

  • Add /worktree to start a fresh conversation or fork the current conversation into a new managed checkout.
  • Offer current-checkout and new-worktree choices for /new and /fork, preserving optional conversation names. Enable these choices for local Git repositories when the worktrees feature is enabled.
  • Load destination configuration, bind the checkout to the replacement thread, and inherit conversation history only when forking.
  • Reject creation from explicitly untrusted sources and require an idle primary session without queued input. Refuse forks when developer instructions differ, with guidance for removing the unused checkout.

Testing

Add picker snapshots and tests for command availability, named selections, fresh versus forked history, destination configuration, worktree ownership, and feature and trust checks.

## What changed

- Add `/worktree` to start a fresh conversation or fork the current conversation into a new managed checkout.
- Offer current-checkout and new-worktree choices for `/new` and `/fork`, preserving optional conversation names. Enable these choices for local Git repositories when the `worktrees` feature is enabled.
- Load destination configuration, bind the checkout to the replacement thread, and inherit conversation history only when forking.
- Reject creation from explicitly untrusted sources and require an idle primary session without queued input. Refuse forks when developer instructions differ, with guidance for removing the unused checkout.

## Testing

Add picker snapshots and tests for command availability, named selections, fresh versus forked history, destination configuration, worktree ownership, and feature and trust checks.

GitOrigin-RevId: d6c83e00217660aacf2a6d92acad50b506607e0b
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/d6c83e00217660aacf2a6d92acad50b506607e0b branch from c64b099 to f6976ab Compare September 5, 2026 22:55
@copyberry
copyberry Bot merged commit f6976ab into main Sep 5, 2026
25 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/d6c83e00217660aacf2a6d92acad50b506607e0b branch September 5, 2026 22:56
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant