Skip to content

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

Closed

Description

@ori-nonni

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
#1143
#1877
#2177

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Oct 31, 2025
  2. github-actions commented on Oct 31, 2025

    @github-actions
    Contributor

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

    • Search for AGENT.md in project subdirectory #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.

  3. ori-nonni commented on Oct 31, 2025

    @ori-nonni
    Author

    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
  4. rekram1-node commented on Oct 31, 2025

    @rekram1-node
    Contributor

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

  5. self-assigned this
    on Oct 31, 2025
  6. ori-nonni commented on Nov 1, 2025

    @ori-nonni
    Author

    @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

  7. rekram1-node commented on Nov 1, 2025

    @rekram1-node
    Contributor

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

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

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions