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_

View original on GitHub ↗

6 Comments

est7 · 8 months ago

Can I make my rules/ be followed in some way right now?

guidedways contributor · 5 months ago

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

MOlechowski · 5 months ago

Possible solution (view diff).

@path/to/file.md in 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 @path references and their content gets inlined into the system prompt. We can nest up to 5 levels deep, and the total size is capped by project_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.

HIRANO-Satoshi · 4 months ago

We need this feature so we can provide user-specific instructions while keeping AGENTS.md in Git and sharing it among users.

FrancescoSaverioZuppichini · 4 months ago

hey billion dollar company, move your ass

Znunu · 3 months ago

please add this aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa