Skip to content

False negative repo detection: reports no git repo in directory with .git #13363

Closed

Description

@llj0824

Summary

Codex reported that there was no git repo in the working directory, but the directory does contain a valid .git folder and Git recognizes it as a work tree.

Git checks returned:

  • ls -la shows .git/
  • git rev-parse --is-inside-work-tree => true
  • git remote -v => empty (no remotes configured)

Despite that, Codex behavior/message indicated there wasn't even a git repo.

Expected

If .git exists and git rev-parse --is-inside-work-tree is true, Codex should recognize it as a git repo (even when no remote is configured).

Actual

Codex treated the directory as non-repo, which caused confusion and blocked expected git-flow guidance.

Environment

  • Date observed: 2026-03-03
  • OS: macOS 14.5 (arm64)
  • Codex CLI: codex-cli 0.107.0

Notes

This may be a path/context mismatch issue between user-visible cwd and the path used for repo detection.

Activity

  1. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    on Mar 3, 2026
  2. llj0824 commented on Mar 3, 2026

    @llj0824
    Author

    uhm sorry codex literally opened this ticket itself.

    I'm closing because it's false-positive. there isn't an issue. sorry about that.

    Image
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

    CLIIssues related to the Codex CLIbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions