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
Add AGENTS.md to the context filename list by default #12345
Since some codebases have AGENTS.md files, would be nice to support reading these as memory files by default. A risk would be that users might not expect it, so seems important to have a way to remove it in the local config. Need to make sure there's a natural way to drop it from the list for a user if it's causing problems.
Additional context
No response
Reacted by Raman, Benjamin Staneck, Mauricio Scheffer, Peter Burns, Jack Stringer, Chung-Chiang Cheng, Joel Scheuner, Matthew Nemeth, Bedis Nbiba, Peter Lithammer and 4 more
One thought here is we could make discovery of AGENTS.md a part of our init, and then ask the user if they want to use it. A further question is whether we should parse the AGENTS.md with our GEMINI.md parser or if we should write an AGENTS.md parser. The two file formats have different features.
The big difference between the two is @ style references and there is an issue tracking this in the agents repo: agentsmd/agents.md#11
I work a lot with Gemini CLI/Claude Code. I usually create symlinks for AGENTS.md that point to GEMINI.md/CLAUDE.md. Not ideal but it works pretty well.
FAF (IANA-registered application/vnd.faf+yaml) approaches this differently - structured YAML with convention-based architecture. No @import syntax debate because the file structure is the contract.
This is a well-defined feature request to expand the default context discovery by adding AGENTS.md to the filename list. The implementation is straightforward (modifying DEFAULT_CONTEXT_FILENAME or its initialization in memoryTool.ts) and provides immediate value to users following the agents.md standard. While there are open discussions regarding specialized parsing for AGENTS.md, adding basic discovery using the existing parser is an excellent first step for community contribution.
A few implementation considerations from working with similar context discovery systems:
Quick Win - Add to Default List
The straightforward implementation would add AGENTS.md to DEFAULT_CONTEXT_FILENAME in memoryTool.ts, as the triage noted.
User Control
For the "way to remove it" concern - the existing local config override mechanism should handle this. Users can already customize the context filename list, so they can drop AGENTS.md if it causes issues.
Foundation Layer Compatibility
If you're interested in structured context underneath AGENTS.md (like many teams are adopting), the .faf format provides YAML-based project definitions that complement prose instruction files like AGENTS.md. The gemini-faf-mcp integration shows this working in practice.
Next Steps
I can submit a PR for the basic filename addition if helpful, or collaborate on the broader context architecture if you're interested in the foundation layer approach.
The reported issue with read_file and read_many_files on Windows appears to be a bug. However, the CLI version (0.1.7) is significantly outdated compared to the current version (0.62.0). Please verify if this issue persists in the latest version.
Activity
allenhutchison commentedon Oct 31, 2025
One thought here is we could make discovery of AGENTS.md a part of our init, and then ask the user if they want to use it. A further question is whether we should parse the AGENTS.md with our GEMINI.md parser or if we should write an AGENTS.md parser. The two file formats have different features.
The big difference between the two is @ style references and there is an issue tracking this in the agents repo: agentsmd/agents.md#11
marabian commentedon Oct 31, 2025
I work a lot with Gemini CLI/Claude Code. I usually create symlinks for AGENTS.md that point to GEMINI.md/CLAUDE.md. Not ideal but it works pretty well.
intellectronica commentedon Nov 5, 2025
https://github.com/intellectronica/ruler automatically injects the necessary config - it defaults to AGENTS.md, but gives every agent (including Gemini) whatever it needs to discover the rules.
Wolfe-Jam commentedon Dec 30, 2025
@allenhutchison - Related to the @Style reference issue you mentioned above: just contributed to agentsmd/agents.md#11 on that import/reference discussion.
FAF (IANA-registered application/vnd.faf+yaml) approaches this differently - structured YAML with convention-based architecture. No @import syntax debate because the file structure is the contract.
Could work as the context layer that AGENTS.md references. Also touched on this in gemini-cli-extensions/conductor#13 re: visibility.
Happy to collaborate on interop.
cocosheng-g commentedon Apr 7, 2026
Triage Summary
Categorization: Help-wanted
This is a well-defined feature request to expand the default context discovery by adding
AGENTS.mdto the filename list. The implementation is straightforward (modifyingDEFAULT_CONTEXT_FILENAMEor its initialization inmemoryTool.ts) and provides immediate value to users following the agents.md standard. While there are open discussions regarding specialized parsing forAGENTS.md, adding basic discovery using the existing parser is an excellent first step for community contribution.Wolfe-Jam commentedon Apr 7, 2026
Happy to help implement this!
A few implementation considerations from working with similar context discovery systems:
Quick Win - Add to Default List
The straightforward implementation would add
AGENTS.mdtoDEFAULT_CONTEXT_FILENAMEinmemoryTool.ts, as the triage noted.User Control
For the "way to remove it" concern - the existing local config override mechanism should handle this. Users can already customize the context filename list, so they can drop
AGENTS.mdif it causes issues.Foundation Layer Compatibility
If you're interested in structured context underneath AGENTS.md (like many teams are adopting), the
.fafformat provides YAML-based project definitions that complement prose instruction files like AGENTS.md. The gemini-faf-mcp integration shows this working in practice.Next Steps
I can submit a PR for the basic filename addition if helpful, or collaborate on the broader context architecture if you're interested in the foundation layer approach.
What's the preferred path forward?
harshpujari commentedon Apr 7, 2026
/assign
gemini-cli commentedon Apr 7, 2026
👋 @harshpujari, you've been assigned to this issue! Thank you for taking the time to contribute. Make sure to check out our contributing guidelines.
harshpujari commentedon Apr 9, 2026
I have comitted the changes in my fork. can you please take a look ?
.mdfile to guide agents #406 as a duplicate of this issuechore: remove redundant GEMINI.md (Antigravity reads AGENTS.md) (#1230)
gemini-cli commentedon Sep 24, 2026
The reported issue with read_file and read_many_files on Windows appears to be a bug. However, the CLI version (0.1.7) is significantly outdated compared to the current version (0.62.0). Please verify if this issue persists in the latest version.