Large repository snapshot warning doesn't take nested .gitignore into account
Resolved 💬 1 comment Opened Nov 22, 2025 by mary-ext Closed Nov 22, 2025
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 medium
What platform is your computer?
Linux 6.17.8-2-cachyos x86_64 unknown (Arch Linux)
What issue are you seeing?
I get the following warning when working on my project for a directory that's clearly been .gitignored
⚠ Repository snapshot encountered large untracked directories: packages/utilities/mst/mst-test-suite/tests/diff/exhaustive (16384
files). This can slow Codex; consider adding these paths to .gitignore or disabling undo in your config.
What steps can reproduce the bug?
# Create a new repository
mkdir test-repo/
cd test-repo/
git init
# Create a test/ directory containing .gitignore and a dozens/ directory containing dozens of files
mkdir -p test/dozens/
echo "/dozens/*.txt" > test/.gitignore
for i in {1..16384}; do touch test/dozens/file_$i.txt; done
# Confirm that Git ignores the files in dozens
git status --short --untracked-files=all
# now open Codex
codex
What is the expected behavior?
Repository snapshot should not be complaining about a large untracked directory
Additional information
For a real repository to test with, clone this repository and run the generate-tests script in packages/utilities/mst
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗