Search @ cannot search from directories excluded by .gitignore
What version of Codex is running?
0.25.0
Which model were you using?
gpt-5
What platform is your computer?
Darwin 24.6.0 arm64 arm
What steps can reproduce the bug?
In VS Code IDE plugin, when typing @ to search a file, only files tracked by git can be searched.
The problem is, in many situations I need to wrote scripts, temp function or handling some sample data. Those related files are not supposed to be tracked by git. I usually put them in a git ignored directory, such as playground/, .local/, temp/ .
If it's about security & privacy issue, would it be designed to read git ignored files only when it's commanded?
What is the expected behavior?
Allow @ files even it's not tracked by git.
What do you see instead?
@ action cannot search git ignored files
Additional information
No response
+1 would like the same, or at least a way to configure this. I add a lot of things to .gitignore (such as certain type of .md files) but want to be able to refer to them as these include instructions for an ongoing task.
I come across the same question, have you solved this problem?
docs.local/
└─ Feature.md
Documentation is ignored in Git, but is needed in AI.
so I wonder have they solved this problem?
quick note on this: it was sort of a head scratcher for me too until i realized the behavior from https://github.com/openai/codex/pull/206 ; i previously maintained a gitignore in my home directory (dotfiles) and set it up in a way where it would ignore all files by default and i would selectively invert the ignore to pick the files I wanted in my repo.
This had the effect where any repository under ~ would effectively fail to @ mention a file within codex cli, unless it got through that directory .gitinore and the parent .gitignore as it traversed up the home directory.
i fixed my issue by just not having a .gitignore in the parent directory but this behavior is unique to codex cli (other solutions seem to not run into this problem, probably because they only respect .gitignore in current directory and nested ones vs. traversing up the directory tree).
bump
bump
@CarlosCommits can you elaborate with a little more effort, what specific issue you're running into? have you tried the workarounds suggested above? what does your current setup look like. a little more info will help provide more insight to the codex team when they look at this issue. As a start, you can try to answer the same questions that LucasChenZQ did at the start of this thread.
@kaushikgopal there's nothing to elaborate? I'm just saying bump to try to get more attention on this issue. This issue is that Codex currently does not let you @ mention any files that are .gitignored.
Need too
bump
This is issue is becoming bottleneck for me to continue with codex :(
bump
How is this still not a thing, half a year later? This should be configurable.
bump and sunscribe
I think this might need integration with VS Code APIs. If you see Google antigravity, they are able to mention .gitignore files, mostly because their agent integration with underlying vs code fork.
Any updates on this? Are PRs welcome?
Any updates on this? Are PRs welcome?
Doesn't look like it. I am also waiting for it.
This is desperately needed. Now i have to do LLM shenanigans and customize workflows just to go around this. Can anyone from OpenAI look into this, please?
This needs to be configurable.
+1