codex - 💡(How to fix) Fix Branch selection leaks between threads in the same project [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19541Fetched 2026-04-26 05:15:31
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Error Message

This means I may start typing or submit work in Thread B without realizing it has silently inherited a branch from another thread (technically not, because it does warn if you have uncommitted changes .

Root Cause

This appears to make branch selection behave like project-global state rather than thread-specific state. It is surprising because the second thread may have been created or continued on a different branch, but its text field context silently switches after activity in another thread.

RAW_BUFFERClick to expand / collapse

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

26.422.30944

What subscription do you have?

Pro

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

When I switch branches inside one Codex thread, then go to another thread in the same project, the other thread’s input area/branch selector automatically changes to the most recently selected branch.

This appears to make branch selection behave like project-global state rather than thread-specific state. It is surprising because the second thread may have been created or continued on a different branch, but its text field context silently switches after activity in another thread.

What steps can reproduce the bug?

  1. Open a project in Codex.
  2. Start or open Thread A.
  3. In Thread A, switch from main to another branch, for example feature-a.
  4. Leave Thread A.
  5. Open or return to Thread B in the same project. Thread B has not used feature-a and was expected to remain on its own branch/context.
  6. Click into Thread B’s text field to write the next prompt.

Actual result: When I go to write my next prompt in Thread B, the text field/branch context has been inadvertently switched to feature-a, the branch most recently selected in Thread A.

This means I may start typing or submit work in Thread B without realizing it has silently inherited a branch from another thread (technically not, because it does warn if you have uncommitted changes .

Expected result: Thread B should keep the branch/context it was already using. Switching branches in Thread A should not affect the branch used when composing the next prompt in Thread B.

What is the expected behavior?

Branch selection should be scoped to the current thread, or at least should not silently change another existing thread’s input context.

When I return to Thread B, it should continue using the branch it was already associated with, such as main or its own previously selected branch. If Codex needs to update branch context globally for a project, it should make that explicit rather than silently changing another thread’s text field.

Additional information

This only seems to happen between threads in the same project. I noticed it when switching to a non-main branch in one thread, then continuing work in another thread for that same project.

Impact: it is easy to accidentally send work to the wrong branch because the branch context changes outside the thread where the branch switch happened.

extent analysis

TL;DR

The issue can be mitigated by ensuring that each thread's branch selection is scoped to the current thread, rather than being project-global.

Guidance

  • Verify that the issue only occurs when switching between threads in the same project, as reported.
  • Check if there are any project-wide settings or configurations that might be causing the branch selection to be shared across threads.
  • Consider adding a warning or prompt when switching branches in one thread, to alert the user that this might affect other threads in the same project.
  • Test whether creating a new thread in a different project resolves the issue, to confirm that the problem is project-specific.

Example

No code snippet is provided, as the issue appears to be related to the Codex App's behavior rather than a specific code implementation.

Notes

The issue may be related to how the Codex App handles project-wide state, and further investigation into the app's configuration and settings may be necessary to resolve the issue.

Recommendation

Apply workaround: Until a fix is available, users can work around the issue by being mindful of the branch selection when switching between threads in the same project, and double-checking the branch context before submitting work.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Branch selection leaks between threads in the same project [1 participants]