feat: support AGENTS.md as default context file#2018
Merged
tanzhenxin merged 2 commits intomainfrom Mar 2, 2026
Merged
Conversation
Add AGENT_CONTEXT_FILENAME constant and include AGENTS.md in default context file search alongside QWEN.md. This enables out-of-the-box support for the AGENTS.md standard (https://agents.md/) without requiring manual configuration. Changes: - Add AGENT_CONTEXT_FILENAME = 'AGENTS.md' constant - Update currentGeminiMdFilename default to include both AGENTS.md and QWEN.md - AGENTS.md takes precedence (first in array) for the de facto standard Closes #2006
Contributor
📋 Review SummaryThis PR adds support for 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
Ahmet-Dedeler
approved these changes
Feb 28, 2026
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
This was referenced Mar 1, 2026
This was referenced Mar 1, 2026
Keep QWEN.md as the first element in the default context filenames array to maintain backward compatibility with /init command and save_memory tool. Both QWEN.md and AGENTS.md will still be searched and loaded, but QWEN.md takes precedence for file creation operations.
This was referenced Mar 2, 2026
This was referenced Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Add support for
AGENTS.mdas a default context file alongsideQWEN.md, enabling out-of-the-box compatibility with the AGENTS.md standard without requiring manual configuration.Dive Deeper
This PR implements the feature requested in #2006. Previously, users had to explicitly configure
context.fileNameto useAGENTS.md. Now Qwen Code will automatically detect and load bothAGENTS.mdandQWEN.mdfiles by default.Changes:
AGENT_CONTEXT_FILENAME = 'AGENTS.md'constantcurrentGeminiMdFilenamedefault to include bothAGENTS.mdandQWEN.mdAGENTS.mdtakes precedence (first in array) as the de facto standardBackward Compatibility:
QWEN.mdfiles continue to work without changescontext.fileNameconfigurationReviewer Test Plan
AGENTS.mdfile in a project directory/memory showcommand)QWEN.mdfiles are still loaded correctlycontext.fileNameconfiguration still overrides defaultsTesting Matrix
Tested on macOS with
npm run test- all memoryTool and memoryDiscovery tests pass.Linked issues / bugs
Resolves #2006