.gitignore in subfolders are not taken into account.

Resolved 💬 4 comments Opened Nov 26, 2025 by jurmous Closed Feb 23, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.63.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.1-codex-max

What platform is your computer?

Darwin 25.1.0 arm64 arm

What issue are you seeing?

Message is shown:

⚠ Repository snapshot encountered large untracked directories: subproject/speak-cache (722 files) This can slow Codex; consider adding
these paths to .gitignore or disabling undo in your config.

These folders are already ignored by a .gitignore in the subproject. So these are not taken into account

What steps can reproduce the bug?

Uploaded thread: 019abf85-0169-7543-adce-65c833a2ee87

What is the expected behavior?

No error message. Those folders are ignored.

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 9 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #7133
  • #7067
  • #6530

Powered by Codex Action

miraclebakelaser contributor · 9 months ago

Clearing the git cache solved this issue for me (also posted this in #7067).

git rm -r --cached .
git add .
etraut-openai contributor · 6 months ago

I looked into this further. Codex delegates this check to git when issuing the warning above. It doesn't directly parse .gitignore. If you're seeing that .gitignore within subfolders are not taken into account, that could be due to an old version of git on your system or a corrupt cache. You could try the solution that @miraclebakelaser suggested above.

jurmous · 6 months ago

Ok clear. I encountered this issue months ago in a repo which I don't actively develop in anymore. I did not encounter the issue since then in other repos. Thanks for looking into it!