Feature request: allow configuring path exclusions for @ file mentions in the IDE
What variant of Codex are you using?
IDE Extension (VS Code), CLI
codex-cli 0.118.0-alpha.2
VS Code on Linux x86_64, Linux hp-pro 6.8.0-106-generic Ubuntu 22.04 x86_64
What feature would you like to see?
Allow configuring path exclusions for @ file mentions in the IDE (Codex chat)
What is missing and what is the problem?
Currently, Codex IDE / VS Code integration does not allow users to exclude specific directories or paths from appearing in the @ file mention picker. This creates issues in large workspaces with duplicated sources, generated files, vendor code, logs, build outputs, or archived folders. Users are unable to prevent irrelevant or sensitive files from being brought into context, which risks accidental inclusion and confusion for the AI model.
What is the expected/desired behavior?
- Add support for path exclusion in @ file mentions via:
- A config option in
~/.codex/config.tomlor.codex/config.toml - Respect for VS Code's
files.excludeorsearch.exclude - A dedicated
.codexignorefile (similar to.gitignore) - Example cases to exclude:
build/install/log/- archived/duplicated source trees (e.g.
src1/) - generated or third-party directories
Steps to reproduce:
- Open a large workspace in VS Code with multiple source roots or duplicated package directories.
- Type
@in the Codex chat input and search for files. - Observe that files from unwanted paths are still selectable.
Benefit:
- Improves usability and safety by reducing accidental context attachment of irrelevant files.
- Helps prevent model confusion and incorrect edits.
Additional information
Mainly a usability/safety improvement. Without exclusions, users can easily pick files accidentally from irrelevant or duplicated directories, which can confuse the model and result in mistakes.
Subscription: ChatGPT Pro / Plus / API
Model: gpt-5.4
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗