-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
None
-
Affects Version/s: 3.4.31
-
Component/s: Git
-
None
-
Major
Title: SourceTree stops showing local branches after custom Git refs are created
SourceTree stops showing local branches in my repository after the OpenAI Codex VS Code extension creates custom Git refs.
Environment
- OS: Microsoft Windows NT 10.0.26220.0 x64
- Git client: SourceTree
- IDE: Visual Studio Code
- Extension: OpenAI Codex IDE extension
- Extension version: 26.609.30741
- Remote: Bitbucket
Problem
After starting a Codex chat in VS Code, custom Git refs are created under:
refs/codex/turn-diffs/checkpoints/...
After that, SourceTree stops showing local branches.
Sometimes fetch also fails with errors like:
fatal: bad object refs/codex/...
error: bitbucket.org:... did not send all necessary objects
Git CLI still shows the local branches correctly:
git branch
Workaround
Deleting the refs/codex refs fixes SourceTree immediately:
git for-each-ref --format='delete %(refname)' refs/codex | git update-ref --stdin
After running that command, SourceTree shows local branches again and fetch works.
Reproduction Steps
- Open a Git repository in VS Code.
- Start a chat using the OpenAI Codex extension.
- Refs are created under refs/codex/turn-diffs/checkpoints/....
- Open the same repository in SourceTree.
- Local branches disappear, or fetch fails.
- Delete refs/codex.
- SourceTree works again.
Expected Behavior
SourceTree should continue to show local branches and fetch normally, even when custom Git refs exist in the repository.
Screenshot: