openai / openai/codex

Codex desktop inspector shows checks from the wrong worktree

Open
#38,082 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug session
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.803.61601 (build 6396)

What subscription do you have?

ChatGPT paid plan via Codex desktop (exact tier is not exposed in this context)

What platform is your computer?

Darwin 27.0.0 arm64 arm

What issue are you seeing?

The right-hand Git/checks inspector can remain bound to the repository's root workspace while the active Codex task is running in a separate worktree for the same repository.

In the active task, the agent and terminal are operating in a dedicated Codex worktree on Branch B. However, the inspector shows the root workspace on Branch A, including Branch A's uncommitted-file count, pull request, failing checks, and merge-conflict status. Clicking the failing check opens Branch A's pull request even though the visible conversation is the Branch B task.

The inspector does not prominently identify this as another task/worktree context. This makes unrelated CI failures appear to belong to the active task and has repeatedly caused incorrect diagnosis and unnecessary work.

The branch dropdown lists Branch B, but selecting it is not a viable workaround because Git correctly rejects the checkout:

fatal: 'Branch B' is already used by worktree at '<dedicated Codex worktree path>'
What steps can reproduce the bug?
  1. Open a repository's root workspace in Codex and check out Branch A there.
  2. Create or open another Codex task for the same repository that uses a dedicated worktree on Branch B.
  3. Ensure Branch A has a pull request with a failing check or merge-conflict status.
  4. Switch to the Branch B task/conversation.
  5. Open the right-hand repository inspector.
  6. Observe that the inspector still displays Branch A and Branch A's PR/check status rather than the active task's Branch B worktree.
  7. Click the failing check: Codex opens Branch A's CI job, which appears contextually attached to the Branch B conversation.
  8. Open the branch dropdown and choose Branch B: checkout fails because Branch B is already checked out in the dedicated worktree.

This reproduces consistently when multiple Codex tasks/worktrees exist for the same repository.

What is the expected behavior?

The Git/checks inspector should follow the active task's worktree and show that worktree's branch, changes, PR, checks, and merge state.

If the inspector is intentionally scoped to a different root workspace, it must state that clearly and must not present that workspace's CI status as though it belongs to the active task. A useful fallback would be a direct control to select the active task's existing worktree without attempting a forbidden Git branch checkout.

Additional information

There are two distinct contexts at the time of failure:

  • Active conversation/terminal: dedicated Codex worktree on Branch B.
  • Right-hand Git/checks inspector: root workspace on Branch A.

The check URL itself is valid for Branch A; the bug is that the inspector is contextually displayed alongside the Branch B task without binding to it or clearly warning that it represents another workspace.

Text reproduction is provided instead of screenshots to avoid exposing private repository and branch names. Screenshots showing the mismatched task, selected branch, unrelated failing check, and blocked branch switch are available if maintainers need them.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the right-hand Git/checks inspector's workspace selection and how it resolves the active Codex task's dedicated worktree. Reproduce the Branch A/Branch B setup and verify that the inspector follows Branch B, or clearly identifies another workspace without presenting its checks as active-task status.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
desktop, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.