You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] .agentsignore file for ignoring paths in config.toml #24993
Add support for specifying paths and files for codex agents to ignore, using e.g. a .agentsignore file, or in the config.toml.
Intended use is to prevent files that contain:
sensitive data
data that might bias AI responses but which are helpful to be versioned (e.g. to show progress or store results for skill development, iterating on prompts, etc.)
Current workarounds are incomplete and unreliable:
Ask agent to respect it in AGENTS.md, but this is easily ignored.
Use a PreToolUse hook with a custom script to attempt to reliably read the tool use and the file path, but (a) there are various ways to not correctly catch reads since Codex reads via shell tools and not a built in Read tool, and (b) agents may try to work around the script.
I am writing this since #205 was closed as "completed", by what looks like a mistaken agent advising to check if it was now supported (it is not):
Thank you for the feedback! Please try the latest version of Codex CLI to see if this feature is supported. If not, we encourage you to contribute to the codex-rs/ implementation. More details on our project update can be found #1174.
changed the title [-][Feature Request] .codexignore file[/-][+][Feature Request] .codexignore/.aiignore file or ignoring paths in config.toml[/+]on May 29, 2026
This would be helpful for ignoring these pestering .claude/ symlinks I need to have because Anthropic dugs in its heels and refuses to support AGENTS.md and .agents/
Exactly the problem I've been trying to solve, and the reason a .codexignore specifically makes it worse, not better.
Every tool shipping its own name (.codexignore, .clineignore, .geminiignore, .cursorignore) means developers maintain N files for N agents. This has been raised multiple times (#2847, with #6530 as a duplicate, agentsmd/agents.md#33, just to name a few) and still unresolved.
@dibstern if you also agree that .agentsignore would be a better (more standardized) file name, could you please update this issue's title to include that name?
changed the title [-][Feature Request] .codexignore/.aiignore file or ignoring paths in config.toml[/-][+][Feature Request] .agentsignore/.codexignore/.aiignore file or ignoring paths in config.toml[/+]on Sep 8, 2026
changed the title [-][Feature Request] .agentsignore/.codexignore/.aiignore file or ignoring paths in config.toml[/-][+][Feature Request] .agentsignore file or ignoring paths in config.toml[/+]on Sep 8, 2026
changed the title [-][Feature Request] .agentsignore file or ignoring paths in config.toml[/-][+][Feature Request] .agentsignore file for ignoring paths in config.toml[/+]on Sep 8, 2026
@dibstern if you also agree that .agentsignore would be a better (more standardized) file name, could you please update this issue's title to include that name?
Activity
[-][Feature Request] .codexignore file[/-][+][Feature Request] .codexignore/.aiignore file or ignoring paths in config.toml[/+]PaulRBerg commentedon Jun 18, 2026
This would be helpful for ignoring these pestering
.claude/symlinks I need to have because Anthropic dugs in its heels and refuses to supportAGENTS.mdand.agents/garogarabed12 commentedon Jun 27, 2026
Exactly the problem I've been trying to solve, and the reason a
.codexignorespecifically makes it worse, not better.Every tool shipping its own name (
.codexignore,.clineignore,.geminiignore,.cursorignore) means developers maintain N files for N agents. This has been raised multiple times (#2847, with #6530 as a duplicate, agentsmd/agents.md#33, just to name a few) and still unresolved.I put together a vendor-neutral RFC for this:
.agentignore- same gitignore syntax, one file designed to work across tools: https://github.com/garogarabed12/agentignoreFull spec in
RFC-0001.md. Would love to see Codex adopt.agentignoreinstead of a Codex-specific name.Happy to answer any questions! 😄
PaulRBerg commentedon Jun 28, 2026
@garogarabed12 that's a good proposal
My vote, however, goes to
.agentsignore(pluralagents, not singular.agent), because:AGENTS.mdand.agentsPaulRBerg commentedon Sep 8, 2026
@dibstern if you also agree that
.agentsignorewould be a better (more standardized) file name, could you please update this issue's title to include that name?[-][Feature Request] .codexignore/.aiignore file or ignoring paths in config.toml[/-][+][Feature Request] .agentsignore/.codexignore/.aiignore file or ignoring paths in config.toml[/+][-][Feature Request] .agentsignore/.codexignore/.aiignore file or ignoring paths in config.toml[/-][+][Feature Request] .agentsignore file or ignoring paths in config.toml[/+][-][Feature Request] .agentsignore file or ignoring paths in config.toml[/-][+][Feature Request] .agentsignore file for ignoring paths in config.toml[/+]dibstern commentedon Sep 8, 2026
Yep, agreed, done!