close worktree when thread archived and/or offer a button in the UI to close worktree

Resolved 💬 2 comments Opened Feb 27, 2026 by emmerich Closed May 2, 2026

What variant of Codex are you using?

App

What feature would you like to see?

Typically towards the end of a thread with Codex I want to be able to checkout the working branch locally - either to run some local tools that don't support worktrees, or to make some final code changes.

I can't do that whilst codex is in its worktree:

fatal: 'feat/some-feature' is already used by worktree at '/Users/stevenh/.codex/worktrees/d721/my-project'

I'd like codex to automatically close worktrees when I archive the thread, or just give me a button to do it, probably here:

<img width="237" height="286" alt="Image" src="https://github.com/user-attachments/assets/1c2c9909-d62f-4f64-a2df-7baf9a8dfc5f" />

Additional information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗