opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: Ability to ignore AGENTS.md

Open NaikSoftware opened this issue 1 month ago • 7 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Now it is able to add custom files that will be attached to the context, but there is no way to disable AGENTS.md. In the repository some users use Codex and some Opencode. We need to have different files for them because OpenCode supports subagents and other differences from Codex. For example, ClaudeCode uses CLAUDE.md and we can add specific instructions only related to the Claude.

NaikSoftware avatar Nov 07 '25 12:11 NaikSoftware

@NaikSoftware do u think "instructions": [...] should allow for exclusions? Just trying to think in terms of settings we already have in opencode.json

rekram1-node avatar Nov 07 '25 16:11 rekram1-node

Yes, I think instructions can override default behaviour. By default read agents.md, claude.md. Settings can override this list by my own

NaikSoftware avatar Nov 07 '25 16:11 NaikSoftware

Right now they are append so we'd need to distinguish them, (some people use them to add their cursor rules for example)

rekram1-node avatar Nov 07 '25 16:11 rekram1-node

Users could specify any list of files they want. cursor and agents.md or any list. It is much flexible than hardcoded some files inside core and ability only to expand list of files.

NaikSoftware avatar Nov 07 '25 16:11 NaikSoftware

Right now they are append so we'd need to distinguish them, (some people use them to add their cursor rules for example)

@rekram1-node not sure if you want to track this as a separate docs issue....

Documentation:

  • instructions are appended (to what...?):
    • https://opencode.ai/docs/config/#instructions (See https://opencode.ai/docs/rules/#custom-instructions)
    • the AGENTS.md is automatically included in the system prompt (https://github.com/sst/opencode/issues/3603#issuecomment-3473903244)

  • Instructions vs Rules (terminology): Pick one (instructions 👍), or elaborate on the distinction

taqtiqa-mark avatar Nov 11 '25 18:11 taqtiqa-mark

yeah having consistent terminology makes sense idek why it is different that's a good point

rekram1-node avatar Nov 12 '25 03:11 rekram1-node

This is certainly a very good idea, many AIs read AGENTS.md(codex, opencode, cursor...) , yet we have no way to differentiate between it, which is certainly frustrating

WAY29 avatar Dec 08 '25 15:12 WAY29