Skip to content

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

Closed as duplicate

Description

@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?

Image

Additional information

no

Activity

  1. added
    bug
    on Mar 26, 2026
  2. added
    CLI
    TUI
    on Mar 26, 2026
  3. removed
    CLI
    on Mar 27, 2026
  4. etraut-openai commented on Oct 12, 2026

    @etraut-openai
    Contributor

    (response from codex)

    Closing as covered by #41559, which tracks sessions that cannot recover once their running cwd is deleted or replaced. This older report adds a macOS case where another terminal removes the git worktree before the next prompt; please keep that external-deletion case in scope there. This is consolidation, not a claim of a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions