Ability to include files in AGENTS.md
Open 💬 6 comments Opened Oct 31, 2025 by jeanlucthumm
💡 Likely answer: A maintainer (guidedways, contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
Typical workflow in Claude Code is to @another-file.md in the AGENTS.md which helps with managing large contexts or supporting temp files that get included only if they're there.
Additional information
_No response_
6 Comments
Can I make my rules/ be followed in some way right now?
It won't matter - codex internally has a hard limit (configurable, thankfully) where it will simply truncate and not read anything more than 32kb: https://github.com/openai/codex/issues/13386
Possible solution (view diff).
@path/to/file.mdin AGENTS.md gets expanded inline into the system prompt. Same@-import syntax that Claude Code, Gemini CLI, Cursor, and Amp Code already support.Implementation
The markdown gets parsed to find
@pathreferences and their content gets inlined into the system prompt. We can nest up to 5 levels deep, and the total size is capped byproject_doc_max_bytes(references that would exceed the limit stay unexpanded). Code blocks and inline code are left alone.The find and inline logic is plugged into
read_project_docs()and happens during session init.Happy to work on this if the team is interested.
We need this feature so we can provide user-specific instructions while keeping AGENTS.md in Git and sharing it among users.
hey billion dollar company, move your ass
please add this aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa