[Feature Request] .codexignore file
Add support for removing files and path from codex.
Intended use is to prevent files that contain sensitive data from being sent to the AI model. For example test files with sensitive input data for testing.
The .codexignore file is similar to a .gitignore file and contains paths that aren't read/updated by the AI.
Also useful for ignoring things like dependency lock files. My pdm.lock is adding ~10k tokens to the context that aren't relevant to codex but I don't want it in .gitignore either.
Not sure if this can be solved by setting this as an instruction in AGENTS.md. If smn can confirm.
Not sure if this can be solved by setting this as an instruction in AGENTS.md. If smn can confirm.
deterministic solutions are always preferable
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 here.
I have worktree directories showing up the @ file dropdown that should be ignored but i don't see a way to add those to not show up in the list
Jetbrains IDEs have support for .aiignore files. You can create one in root dir of your project and use codex through their chat plugin and the model should respect the file. I've added all env varibles, .pem files, secrets, etc. in and it seems to work right now.
Would be great to see codex adopt this standard.
The fact that codex supports llms.txt but refuses to implement support for an .aiignore is just silly.
Why has this issue been closed as completed? It doesn't seem like this feature is supported.
When its too much AI slop that you dont even review what issue was being opened and closed. Just keep pushing for code.
There's a separate open issue about this feature request, everyone in this thread, please upvote that issue so that it gets more visibility:
https://github.com/openai/codex/issues/24993
Thanks @PaulRBerg !