codex - 💡(How to fix) Fix The .git folder has been included in the list of file candidates [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#19545Fetched 2026-04-26 05:15:24
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4mentioned ×1subscribed ×1
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.125.0

What subscription do you have?

custom provider, support OpenAI Compatible Protocal

Which model were you using?

gpt-5-codex

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

Windows Terminal (Powershell)

What issue are you seeing?

› help me solve the problem in @cp

compile\cpp.go compile compile\tests.go .git\hooks\pre-commit.sample .git\hooks\pre-merge-commit.sample .git\objects\pack .git\hooks\commit-msg.sample .git\hooks\push-to-checkout.sample

<img width="503" height="430" alt="Image" src="https://github.com/user-attachments/assets/2baa2f5a-7d01-4de1-921b-850bf9d6e4a0" />

What steps can reproduce the bug?

Use codex in a git repository, and search files. hmmm...

What is the expected behavior?

The git folder is not included.

Additional information

No response

extent analysis

TL;DR

The issue can be fixed by excluding the .git directory from the search scope in the Codex CLI.

Guidance

  • The problem seems to be related to the Codex CLI including the .git directory in its search results, which is not the expected behavior.
  • To verify this, try searching for files outside of a Git repository to see if the issue persists.
  • To mitigate this, consider using a flag or option to exclude the .git directory from the search scope, if available.
  • Check the Codex CLI documentation for any options related to directory exclusion or filtering.

Notes

The provided information does not include details about the specific command or flags used with the Codex CLI, which might be necessary to provide a more precise solution.

Recommendation

Apply workaround: exclude the .git directory from the search scope, as this seems to be the most direct way to address the issue based on the information provided.

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