Answer: Instruction files below the workspace are discovered as the agent explores the project, and nested files are loaded nearest-first and deduplicated while their instruction entry remains in model-visible history. Status: Overdue (check was due 2026-11-20T13:36:52Z and has not succeeded) Entry: tool/opencode/memory-and-context/agents-md-discovery-order Revision: 2 Digest: sha256:4360b9f7b1ccb48f (changes whenever the content changes) Timeline: Created: 2026-11-13T03:57:42Z Last changed: 2026-11-18T13:40:09Z (deduplication condition: — → while their instruction entry remains in model-visible history) Last verified: 2026-11-19T13:36:52Z Next check: 2026-11-20T13:36:52Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of discovery method | discovered as the agent explores the project | [1] | 2026-11-19 ordering | nearest-first | [1] | 2026-11-19 deduplication condition | while their instruction entry remains in model-visible history | [1] | 2026-11-19 reload condition | If compaction or a revert removes that entry, a later read can load the file again. | [1] | 2026-11-19 Sources: [1] opencode. "Instructions | OpenCode". https://opencode.ai/docs/instructions/ Role: primary. Accessed: 2026-11-19T13:36:52Z Quote: "Instruction files below the workspace are discovered as the agent explores the project." (Supports: discovery method) Quote: "Nested files are loaded nearest-first and deduplicated while their instruction entry remains in model-visible history." (Supports: ordering, deduplication condition) Quote: "If compaction or a revert removes that entry, a later read can load the file again." (Supports: reload condition) Snapshot SHA-256: 1658411ae7ccab85bdcabcdc548fba65e11a1a2c73766d8708ecf3e60b45b6ec (captured 2026-11-18T13:40:08Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:40:09Z, so the values verified then were kept. Cross-check: not-available at 2026-11-19T13:36:52Z. No independent second source is configured for this entry Last successful check: 2026-11-19T13:36:52Z Last attempt: 2026-11-19T13:36:52Z Notes and limitations: Extracted automatically from a single official source (section "Discovery"). Related: https://latestn.com/tool/opencode/memory-and-context/agents-md-file-location Where should I place AGENTS.md files so opencode applies them to the right directories? https://latestn.com/tool/opencode/memory-and-context/instructions-updates How do I update opencode project instructions when files change? https://latestn.com/tool/opencode/memory-and-context/manual-compaction How do I trigger compaction manually in opencode? https://latestn.com/tool/opencode/integrations/tui-plugin-toast How do I show a toast notification from an opencode TUI plugin? https://latestn.com/tool/opencode/integrations/use-in-ci How do I use opencode in a CI pipeline like GitHub Actions? https://latestn.com/tool/opencode/integrations/websearch-providers-env-vars Which web search providers does opencode support and what environment variables do they use? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:40:09Z | changed | deduplication condition: — → while their instruction entry remains in model-visible history | [1] 2026-11-18T13:40:09Z | changed | deduplication: deduplicated → — | [1] 2026-11-18T13:40:09Z | changed | load trigger: Reading a file or listing a directory loads any AGENTS.md files between that target and the workspace. → — | [1] 2026-11-13T03:57:42Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/memory-and-context/agents-md-discovery-order/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/memory-and-context/agents-md-discovery-order POST: https://latestn.com/dispute/tool/opencode/memory-and-context/agents-md-discovery-order with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/memory-and-context/agents-md-discovery-order?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How does opencode discover and order AGENTS.md instruction files? Revision 2, last verified 2026-11-19T13:36:52Z. https://latestn.com/tool/opencode/memory-and-context/agents-md-discovery-order (accessed 2026-11-21T09:59:23Z). @misc{LatestN_tool_opencode_memory_and_context_agents_md_discovery_order_r2, title = {How does opencode discover and order AGENTS.md instruction files?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/memory-and-context/agents-md-discovery-order}}, note = {Revision 2; digest sha256:4360b9f7b1ccb48f; last verified 2026-11-19T13:36:52Z; accessed 2026-11-21T09:59:23Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/memory-and-context/agents-md-discovery-order