anomalyco / anomalyco/opencode
v2: read tool duplicates subdirectory AGENTS.md content
Open
@nexxeln is already working on this.
Since Jul 24, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Reading a subdirectory AGENTS.md via the read tool loads it twice — once as the tool result and again as a synthetic instruction message. The candidates filter at packages/core/src/tool/read.ts:99 excludes only the Location-root AGENTS.md, not the path just read.
Plugins
N/A
OpenCode version
v2
Steps to reproduce
- Put an
AGENTS.mdin a project subdirectory. - Start a session at the project root.
- Have the agent read a file in that subdirectory.
- The
AGENTS.mdappears both as thereadtool result and as aInstructions from: <path>synthetic message.
Screenshot and/or share link
N/A
Operating System
N/A
Terminal
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.