Skip to content

Automatically load @ referenced files in AGENTS.md into context #2225

@tobias-walle

Description

@tobias-walle

First of all, thank you for this great project. I really enjoy using it, and it is amazing how fast you improve it!

Claude Code has the very nice feature that you can reference other files using @ in your CLAUDE.md, and it is automatically loaded into the session. This is very helpful to split rules into multiple files or to directly load core files (like the package.json) in every session. With this feature, a minimal instruction file can then look like this:

# Instructions

-  Avoid excessive comments.
-  Prefer a functional approach over classes.
-  Create reusable functions to keep the code clean and readable.

## Relevant Files

-  @./README.md
-  @./package.json
-  @./tsconfig.json
-  @./docs/bun.md

Unfortunately, OpenCode currently doesn't have the same behaviour with AGENTS.md.

It would be great if this could be added and would increase the consistency with the newly added commands feature.

I could also help with a contribution if that would support you.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions