Skip to content

Ability to include files in AGENTS.md #6038

Open

Description

@jeanlucthumm

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

Activity

  1. added
    enhancement
    on Oct 31, 2025
  2. added
    context
    on Nov 16, 2025
  3. est7 commented on Dec 11, 2025

    @est7

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

  4. guidedways commented on Mar 4, 2026

    @guidedways
    Contributor

    It won't matter - codex internally has a hard limit (configurable, thankfully) where it will simply truncate and not read anything more than 32kb: #13386

  5. MOlechowski commented on Mar 16, 2026

    @MOlechowski

    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.

  6. HIRANO-Satoshi commented on Apr 28, 2026

    @HIRANO-Satoshi

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

  7. FrancescoSaverioZuppichini commented on Apr 29, 2026

    @FrancescoSaverioZuppichini

    hey billion dollar company, move your ass

  8. Znunu commented on May 3, 2026

    @Znunu

    please add this aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contextenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions