Markdown agent profiles don't populate referenced files automatically #4759

Open
opened 2026-02-16 17:45:19 -05:00 by yindo · 1 comment
Owner

Originally created by @AndyRightNow on GitHub (Jan 11, 2026).

Originally assigned to: @thdxr on GitHub.

Description

The agent markdown profiles defined using https://opencode.ai/docs/agents/#markdown don't populate the referenced files automatically such as

@path/to/file.md

There is high probability for the agents not to read the files at all, causing the prompts never getting sent to the agent.

Plugins

No response

OpenCode version

1.1.13

Steps to reproduce

  1. Use @path/to/file.md in agent markdown profiles
  2. Invoke the agent and ask it to output its base instruction verbatim
  3. It will say that there are some referenced files it cannot see

Screenshot and/or share link

No response

Operating System

macOS 26.2

Terminal

Ghostty

Originally created by @AndyRightNow on GitHub (Jan 11, 2026). Originally assigned to: @thdxr on GitHub. ### Description The agent markdown profiles defined using https://opencode.ai/docs/agents/#markdown don't populate the referenced files automatically such as ```markdown @path/to/file.md ``` There is high probability for the agents not to read the files at all, causing the prompts never getting sent to the agent. ### Plugins _No response_ ### OpenCode version 1.1.13 ### Steps to reproduce 1. Use `@path/to/file.md` in agent markdown profiles 2. Invoke the agent and ask it to output its base instruction verbatim 3. It will say that there are some referenced files it cannot see ### Screenshot and/or share link _No response_ ### Operating System macOS 26.2 ### Terminal Ghostty
yindo added the bugdocs labels 2026-02-16 17:45:19 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 11, 2026):

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

  • #2225: Automatically load @ referenced files in AGENTS.md into context (describes the exact same feature request for auto-loading referenced files using @path syntax)
  • #4758: Custom instruction files in opencode.jsonc not being loaded (related issue about files not being automatically loaded for agent context)

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

@github-actions[bot] commented on GitHub (Jan 11, 2026): This issue might be a duplicate of existing issues. Please check: - #2225: Automatically load @ referenced files in AGENTS.md into context (describes the exact same feature request for auto-loading referenced files using @path syntax) - #4758: Custom instruction files in `opencode.jsonc` not being loaded (related issue about files not being automatically loaded for agent context) Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4759