⚠ Repository snapshot encountered large untracked directories: webroot/attachments (274 files). This can slow Codex; consider adding these paths to .gitignore or disabling undo in your config.
What version of Codex is running?
codex-cli 0.61.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.1-codex-max
What platform is your computer?
Darwin 21.6.0 x86_64 i386
What issue are you seeing?
This directory is already in my .gitignore, and it is also in .codexignore.
My .codexignore file:
# Exclude large media from Codex snapshots/undo (multiple patterns to cover both rooted and nested)
/webroot/attachments/**
webroot/attachments/**
/webroot/video/**
webroot/video/**
/uploads/**
uploads/**
My .gitignore file:
/config/app_local.php
/config/.env
/logs/*
/tmp/*
/vendor/*
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon
ehthumbs.db
Thumbs.db
.directory
.phpunit.cache
tests.sqlite
*~
*.swp
*.swo
*.sublime-*
*.stTheme.cache
*.tmlanguage.cache
*.tmPreferences.cache
.settings/*
.idea/*
nbproject/*
.vscode
.nova
.sass-cache/
/node_modules/*
yarn-debug.log
yarn-error.log
/resources/git-commands.txt
/resources/DEPLOYMENT.md
!.cpanel.yml
.env
/webroot/attachments/*
!/webroot/attachments/.gitignore
!/webroot/attachments/.gitkeep
/webroot/video/*
!/webroot/video/.gitignore
!/webroot/video/.gitkeep
/uploads/*
!/uploads/.gitignore
!/uploads/.gitkeep
What steps can reproduce the bug?
Just start a new session and I get the warning for every single prompt the entire session.
What is the expected behavior?
Since it is in the .gitignore file, it should be ignored.
Additional information
_No response_
10 Comments
I have the same message with files that are part of .gitignore and should be ignored.
I have this message with files that are ignored through a
.gitignorein a subdirectory. Is the nesting an issue or perhaps double asterisk patterns?Example:
Another possibility is the misinterpretation of
/cacheas an absolute path, rather than based from the current dir?Getting similar error:
Repository snapshot encountered large untracked directories: foo (123 files). This can slow Codex; consider adding these paths to .gitignore or disabling undo in your config.However I have a
.gitignorefile insidefoo/:I have the same issue
repro steps from #7133
it seems to be happening specifically because of the wildcard, not that it starts with a leading path
dozensdozens//dozens/dozens/dozens/*.txtSame issue here for
storage/framework/views.We have a
.gitignorefile within the folder itself containing only我也遇到了同样的问题。
clearing the git cache solved this issue for me.
I can confirm the problem (WSL / current Codex version 0.63.0). Even with a clean index.
git rm -r --cached . && git add . && git commit -m "Reapply .gitignore and clean index"=> Nevertheless, this message:
@lionel-oai https://github.com/openai/codex/blob/4d4778ec1cbc93ff2b992afc4a4214bbffa26c2a/codex-rs/utils/git/src/ghost_commits.rs#L33 It probably makes sense to also include
__pycache__andvendorin DEFAULT_IGNORED_DIR_NAMES.Thank you for the solution and have a wonderful pre-Christmas season!