[FEATURE]:Display warning when agents.md is not accessible #2379

Open
opened 2026-02-16 17:35:23 -05:00 by yindo · 5 comments
Owner

Originally created by @ori-nonni on GitHub (Oct 31, 2025).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

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

Describe the enhancement you want to request

I have a mono repo and I often start opencode accidentally from a sub directory. Due to sandboxing, the agent does not have access to the agents.md file and therefore is not aware of my preferences or even code that would be relevant to the task at hand.

I would really like opencode to let me know when I'm trying to use an agent that does not have access to my agents.md whether it's due to sandboxing or because initialization has not been done.

If it is actually easy to set the context to the repo root when starting from a subfolder, I have not found it in the documentation.

I'm mainly talking about the UX, I would really want a message/warning light that the agent is flying blind.

There are some other issues that mention similar issues, afaict the most relevant are
https://github.com/sst/opencode/issues/1143
https://github.com/sst/opencode/issues/1877
https://github.com/sst/opencode/issues/2177

Originally created by @ori-nonni on GitHub (Oct 31, 2025). Originally assigned to: @rekram1-node on GitHub. ### 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 I have a mono repo and I often start opencode accidentally from a sub directory. Due to sandboxing, the agent does not have access to the agents.md file and therefore is not aware of my preferences or even code that would be relevant to the task at hand. I would really like opencode to let me know when I'm trying to use an agent that does not have access to my agents.md whether it's due to sandboxing or because initialization has not been done. If it is actually easy to set the context to the repo root when starting from a subfolder, I have not found it in the documentation. I'm mainly talking about the UX, I would really want a message/warning light that the agent is flying blind. There are some other issues that mention similar issues, afaict the most relevant are https://github.com/sst/opencode/issues/1143 https://github.com/sst/opencode/issues/1877 https://github.com/sst/opencode/issues/2177
yindo added the discussion label 2026-02-16 17:35:23 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 31, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2094: Search for AGENT.md in project subdirectory - This issue requests exactly the same functionality: implementing project root identification (e.g. based on .git, pyproject.toml files) and loading AGENTS.md files from the project root when OpenCode is started from a subdirectory.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 31, 2025): This issue might be a duplicate of existing issues. Please check: - #2094: Search for AGENT.md in project subdirectory - This issue requests exactly the same functionality: implementing project root identification (e.g. based on .git, pyproject.toml files) and loading AGENTS.md files from the project root when OpenCode is started from a subdirectory. Feel free to ignore if none of these address your specific case.
Author
Owner

@ori-nonni commented on GitHub (Oct 31, 2025):

This issue might be a duplicate of existing issues. Please check:

* [Search for AGENT.md in project subdirectory #2094](https://github.com/sst/opencode/issues/2094): Search for AGENT.md in project subdirectory - This issue requests exactly the same functionality: implementing project root identification (e.g. based on .git, pyproject.toml files) and loading AGENTS.md files from the project root when OpenCode is started from a subdirectory.

Feel free to ignore if none of these address your specific case.

This is very relevant, but for some reason I'm not seeing the behaviour outlined in #2094. If I start inside a subfolder of my monorepo, the agent does NOT have access to my agents.md. (verified by asking the agent). See image.

Also, this is a slightly different issue, as it is asking for UI to warn the user when the agent is flying blind.

Image
@ori-nonni commented on GitHub (Oct 31, 2025): > This issue might be a duplicate of existing issues. Please check: > > * [Search for AGENT.md in project subdirectory #2094](https://github.com/sst/opencode/issues/2094): Search for AGENT.md in project subdirectory - This issue requests exactly the same functionality: implementing project root identification (e.g. based on .git, pyproject.toml files) and loading AGENTS.md files from the project root when OpenCode is started from a subdirectory. > > > Feel free to ignore if none of these address your specific case. This is very relevant, but for some reason I'm not seeing the behaviour outlined in #2094. If I start inside a subfolder of my monorepo, the agent does NOT have access to my agents.md. (verified by asking the agent). See image. Also, this is a slightly different issue, as it is asking for UI to warn the user when the agent is flying blind. <img width="2172" height="868" alt="Image" src="https://github.com/user-attachments/assets/2cc904fb-9df4-40d4-8f2b-d0c1f5420891" />
Author
Owner

@rekram1-node commented on GitHub (Oct 31, 2025):

@ori-nonni the AGENTS.md is automatically included in the system prompt

@rekram1-node commented on GitHub (Oct 31, 2025): @ori-nonni the AGENTS.md is automatically included in the system prompt
Author
Owner

@ori-nonni commented on GitHub (Nov 1, 2025):

@ori-nonni the AGENTS.md is automatically included in the system prompt

Ah, then it's honestly a non-issue. I ran into this when I wanted the build agent to update my agents file and then I was concerned that the agent didn't know about my preferences etc.

So I think the outstanding issue is maybe a little bit more documentation for noobs about how to work efficiently in a mono repo (agent override or extension in a single project), also maybe give access to a sister project without restarting the tui

@ori-nonni commented on GitHub (Nov 1, 2025): > [@ori-nonni](https://github.com/ori-nonni) the AGENTS.md is automatically included in the system prompt Ah, then it's honestly a non-issue. I ran into this when I wanted the build agent to update my agents file and then I was concerned that the agent didn't know about my preferences etc. So I think the outstanding issue is maybe a little bit more documentation for noobs about how to work efficiently in a mono repo (agent override or extension in a single project), also maybe give access to a sister project without restarting the tui
Author
Owner

@rekram1-node commented on GitHub (Nov 1, 2025):

yeah adding stuff outside current dir is something we need to add

@rekram1-node commented on GitHub (Nov 1, 2025): yeah adding stuff outside current dir is something we need to add
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2379