Removing a git worktree on a codex session that is currently being worked on crashes the terminal ungracefully.

Open 💬 0 comments Opened Mar 26, 2026 by kiankyars

What version of Codex CLI is running?

0.116.0

What subscription do you have?

max

Which model were you using?

5.4 x high

What platform is your computer?

tahoe

What terminal emulator and version are you using (if applicable)?

zsh

What issue are you seeing?

I was working on a Git work tree and I removed it in another session, when I tried to re-prompt in that chat that was on the remove.git worktree, I got this Rust error, which made it such that the terminal was no longer responsive. This should ideally have a more graceful error message.

What steps can reproduce the bug?

  1. Create a Git worktree on a repository.
  2. Open a Codex session on that Git worktree.
  3. From another terminal, close the Git worktree and try to re-prompt the chat in the now-closed Git worktree.

What is the expected behavior?

<img width="1276" height="353" alt="Image" src="https://github.com/user-attachments/assets/aed6cae6-c39d-439e-a280-9556d5ae46d0" />

Additional information

no

View original on GitHub ↗