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
Reacted by Josh Wand, Jose R. Prieto, Sergio Valverde, Tim Petricola, Minsu Lee, YuTengjing, Hannes Burrichter, James Barrett, Jamie Lee, Stas (Stanislav) Korzovsky and 67 more
Until OpenAI adds this (super important) feature to AGENTS.md and Codex CLI, you can use my Python script to flatten Markdown files that use Claude’s @foo.md file-reference syntax:
I'm a maintainer on Gemini CLI. We're exploring the option of making AGENTS.md our standard context file but we have an import feature with @ style references in GEMINI.md. I'd love to see an equivalent reference feature added to the AGENTS.md standard. This would make it much easier for us to support AGENTS.md by default. Issue in our repo that is tracking this: google-gemini/gemini-cli#12345
Reacted by Hannes Burrichter, Landon Schropp, Maga D. Zandaqo, Glenn 'devalias' Grant, Eleanor Berger, Nithin Raj, Peter Dedene, Ray Shan, Nathan Lewis, Arno Gobbin and 14 more
I'm primarily interested in this feature being standardized in order to support LLM-driven dynamic rewriting of files imported by the AGENTS.md.
AGENTS.md files are currently hand-written, but LLMs have a tendency to collapse large volumes of text. To support maintaining both domains (strict adherence to a hand-written policy and general advice produced by an LLM), references to other files are needed, so that the LLM can freely mess up specific imported segments but not affect others.
Reacted by Paul Berg, Jean-Luc Thumm, Hannes Burrichter, Jason Vinion, David Hoepelman and Majimay
You can reference multiple files in a single message (for example, “@file1.js and @file2.js”)
Here, @file1.js and @file2.js in CLAUDE.md likely induces a prompt like
--- BEGINNING of file: CLAUDE.md ---
[…]
@file1.js and @file2.js
[…]
--- END of file: CLAUDE.md ---
--- BEGINNING of file: file1.js ---
<file contents>
--- END of file: file1.js --
--- BEGINNING of file: file2.js ---
<file contents>
--- END of file: file2.js --
It seems very useful for partial overrides. A common use case would be developer-private agent instructions, similar to how projects often use .env plus .env.production / .env.local style layering.
For example, a repository may want to keep a shared AGENTS.md, while individual developers may want to append or override only a small subset of instructions for their own machine, shell, or workflow, without replacing the entire file.
@-style references (or any equivalent modular include / layering mechanism) seem like a very natural solution for this. Is there already a plan to make this part of the standard, rather than something only supported by specific implementations?
I was already using this with CLAUDE.md and to my surprise it's not standard for AGENTS.md. This is an extremely useful feature for local overrides and to keep your context organized.
Reacted by Haibo Xi, Guillem Poy, Roman Scher and Tim Sterzel
Hi @romainhuet@dkundel, following up on this since it's been open for over a year and keeps coming up (#9 and #71 both reference it).
Several AGENTS.md consumers already implement @path imports in practice: Claude Code, OpenCode, Amp, and Zed. Others, like Codex, don't document any import mechanism: per the Codex docs, AGENTS.md files are concatenated as-is, so @ references aren't expanded. That means a repo that relies on imports today gets different context depending on which agent reads it, which undercuts the cross-tool goal of the format.
Now that the project has a Technical Charter under AAIF, could you share whether import/reference support is on the roadmap for the spec? In particular:
Is there an agreed direction on syntax (@path vs. something else) and semantics (inline vs. appended, relative path base, recursion limits)?
Where are spec changes like this being discussed and decided now?
That’s what I’ve been trying to figure out, but everyday time, I put the work together remember, before I did this, I ran two audits. I have someone internally, taking my work apart and it takes skid hub about maybe a half a month to get a hold of me and when I reach out, nobody wants to tell me anything. I know I know I’m doing what’s right because I had it audited and then I had a human audited and then audited it again so I knew what I was doing before I did all this work. They were trying to steal my money just because I was waiting till I knew what I was doing before I put it together. Just because I was a little slow because I wanted to learn how to do coding right. Does that mean people get to steal my money?Sent from my iPhoneOn Oct 20, 2026, at 12:40 AM, Aric Radzin ***@***.***> wrote:Aric5301 left a comment (agentsmd/agents.md#11)
Hi @romainhuet@dkundel, following up on this since it's been open for over a year and keeps coming up (#9 and #71 both reference it).
Several AGENTS.md consumers already implement @path imports in practice: Claude Code, OpenCode, Amp, and Zed. Others, like Codex, don't document any import mechanism: per the Codex docs, AGENTS.md files are concatenated as-is, so @ references aren't expanded. That means a repo that relies on imports today gets different context depending on which agent reads it, which undercuts the cross-tool goal of the format.
Now that the project has a Technical Charter under AAIF, could you share whether import/reference support is on the roadmap for the spec? In particular:
Is there an agreed direction on syntax ***@***.*** vs. something else) and semantics (inline vs. appended, relative path base, recursion limits)?
Where are spec changes like this being discussed and decided now?
@allenhutchison, is this still blocking Gemini CLI from defaulting to AGENTS.md (google-gemini/gemini-cli#12345)? A concrete implementer requirement would help scope it.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
Activity
joserprieto commentedon Aug 20, 2025
Great timing! Just posted about a similar modular approach on LinkedIn.
I've been using this pattern with Claude Code for months - the import functionality is a game changer for maintaining complex contexts.
Happy to share implementation patterns and real-world usage examples.
LinkedIn post:
https://www.linkedin.com/posts/joserprieto_manage-claudes-memory-activity-7364033253990719490-944Y
PaulRBerg commentedon Oct 3, 2025
Until OpenAI adds this (super important) feature to
AGENTS.mdand Codex CLI, you can use my Python script to flatten Markdown files that use Claude’s@foo.mdfile-reference syntax:https://gist.github.com/PaulRBerg/3c78def758cec459b987f6968c8e018d
allenhutchison commentedon Oct 31, 2025
I'm a maintainer on Gemini CLI. We're exploring the option of making AGENTS.md our standard context file but we have an import feature with @ style references in GEMINI.md. I'd love to see an equivalent reference feature added to the AGENTS.md standard. This would make it much easier for us to support AGENTS.md by default. Issue in our repo that is tracking this: google-gemini/gemini-cli#12345
joserprieto commentedon Nov 13, 2025
There are workarounds to achieve include-like functionality with AGENTS.md:
Navigate agents to specific directories; their AGENTS.md is loaded automatically.
Not perfect, but functional with most agents.
illeatmyhat commentedon Nov 20, 2025
I'm primarily interested in this feature being standardized in order to support LLM-driven dynamic rewriting of files imported by the AGENTS.md.
AGENTS.md files are currently hand-written, but LLMs have a tendency to collapse large volumes of text. To support maintaining both domains (strict adherence to a hand-written policy and general advice produced by an LLM), references to other files are needed, so that the LLM can freely mess up specific imported segments but not affect others.
Wolfe-Jam commentedon Dec 30, 2025
codethief commentedon Mar 10, 2026
@PaulRBerg Regarding the screenshot you posted: Note that Claude Code does not naively inject the referenced file's content in-place but it probably appends the files to the context with appropriate delimiters and labeling. Otherwise, the examples from https://code.claude.com/docs/en/common-workflows#reference-files-and-directories that include inline references would not work as expected.
Here,
@file1.js and @file2.jsinCLAUDE.mdlikely induces a prompt likePjrich1313 commentedon Mar 10, 2026
ysysimon commentedon Mar 19, 2026
Has this feature not been standardized yet?
It seems very useful for partial overrides. A common use case would be developer-private agent instructions, similar to how projects often use
.envplus.env.production/.env.localstyle layering.For example, a repository may want to keep a shared
AGENTS.md, while individual developers may want to append or override only a small subset of instructions for their own machine, shell, or workflow, without replacing the entire file.@-style references (or any equivalent modular include / layering mechanism) seem like a very natural solution for this. Is there already a plan to make this part of the standard, rather than something only supported by specific implementations?MisaoDev commentedon May 5, 2026
I was already using this with CLAUDE.md and to my surprise it's not standard for AGENTS.md. This is an extremely useful feature for local overrides and to keep your context organized.
fix: 앵커 안내 문장이 자기가 놓인 파일에 대해 참이 되게 한다 (#305) (#390)
Aric5301 commentedon Oct 20, 2026
Hi @romainhuet @dkundel, following up on this since it's been open for over a year and keeps coming up (#9 and #71 both reference it).
Several AGENTS.md consumers already implement
@pathimports in practice: Claude Code, OpenCode, Amp, and Zed. Others, like Codex, don't document any import mechanism: per the Codex docs, AGENTS.md files are concatenated as-is, so@references aren't expanded. That means a repo that relies on imports today gets different context depending on which agent reads it, which undercuts the cross-tool goal of the format.Now that the project has a Technical Charter under AAIF, could you share whether import/reference support is on the roadmap for the spec? In particular:
@pathvs. something else) and semantics (inline vs. appended, relative path base, recursion limits)?@allenhutchison, is this still blocking Gemini CLI from defaulting to AGENTS.md (google-gemini/gemini-cli#12345)? A concrete implementer requirement would help scope it.
Pjrich1313 commentedon Oct 21, 2026