SourceTree stop showing local branches when custom Git refs like refs/codex exist

XMLWordPrintable

    • 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

      1. Open a Git repository in VS Code.
      2. Start a chat using the OpenAI Codex extension.
      3. Refs are created under refs/codex/turn-diffs/checkpoints/....
      4. Open the same repository in SourceTree.
      5. Local branches disappear, or fetch fails.
      6. Delete refs/codex.
      7. 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:

        

              Assignee:
              Unassigned
              Reporter:
              添喜黄
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: