Skip to content

Windows app shows "Create git repository" for valid WSL worktrees and does not show branch in thread #14182

Closed as duplicate

Description

@p13i

Summary

In Codex Windows app, chat threads opened from WSL worktree paths sometimes show “Create git repository” under the submit box even though the folder is a valid Git repo. The branch indicator for that thread also does not reflect the actual branch (ra, rb, rc).

Environment

  • App: Codex Windows app (Microsoft Store package OpenAI.Codex)
  • Observed version: 26.305.950.0 (from process path)
  • OS: Windows + WSL2 (Ubuntu)
  • Workspace paths:
    • \\wsl.localhost\\Ubuntu\\www\\worktrees\\cs-ra
    • \\wsl.localhost\\Ubuntu\\www\\worktrees\\cs-rb
    • \\wsl.localhost\\Ubuntu\\www\\worktrees\\cs-rc
  • Date observed: March 9-10, 2026 (America/Los_Angeles)

Repro Steps

  1. Create or use multiple Git worktrees in WSL:
    • /www/worktrees/cs-ra on branch ra
    • /www/worktrees/cs-rb on branch rb
    • /www/worktrees/cs-rc on branch rc
  2. Open Codex Windows app and launch/open threads for those UNC paths (\\wsl.localhost\\Ubuntu\\...).
  3. In each thread, observe the UI under the submit box.

Actual Behavior

  • UI shows “Create git repository” in threads for cs-rb and cs-rc (sometimes also after reopening cs-ra).
  • Branch is not shown correctly for affected threads.
  • Looks like thread cwd/workspace binding is stale or unresolved in app state.

Expected Behavior

  • Codex should detect existing Git repo for each workspace thread.
  • Branch indicator should show the actual branch for that workspace (ra, rb, rc).
  • Opening additional workspaces should not lose Git context.

Verification that repos are valid

From WSL shell:

  • git -C /www/worktrees/cs-rb rev-parse --is-inside-work-tree -> true
  • git -C /www/worktrees/cs-rc rev-parse --is-inside-work-tree -> true
  • git -C /www/worktrees/cs-rb branch --show-current -> rb
  • git -C /www/worktrees/cs-rc branch --show-current -> rc

Additional Notes

  • Codex appears single-instance; launching with a new path may not always rebind active thread cwd.
  • Full app restart sometimes helps, but stale threads can still show incorrect Git state.
  • This seems specific to app thread state/workspace resolution, not Git setup.

Activity

  1. added
    bug
    app
    windows-os
    on Mar 10, 2026
  2. MineScieper commented on Mar 10, 2026

    @MineScieper

    I have the same error and I just run git init in cmd in my project directory. Then I get an git error - "git fatal detected dubious ownership in repository", when I fixed it and run git init again - Codex could find my repo and master branch. Hope it helps

  3. ofek commented on Mar 14, 2026

    @ofek

    I think the root cause is #10347

  4. added
    worktrees
    on Apr 24, 2026
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

    Gitappbugwindows-osworktrees

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions