Does opencode have access to opencode's docs? #2027

Open
opened 2026-02-16 17:33:48 -05:00 by yindo · 2 comments
Owner

Originally created by @kierr on GitHub (Oct 9, 2025).

Originally assigned to: @thdxr on GitHub.

I have found opencode isn't very good at understanding itself, especially when it comes to writing plugins or custom tools. Context7 is obviously available, as is webfetch. But since collating all the .mdx docs to provide as context, performance wise it's doing a much better job "on itself". Context7 works sometimes but it's often too narrowly scoped, I've found an information dump far more effective.

A usage example is asking "In opencode, how can I run a linter after each file edit and have any violations fixed immediately". Or questions where there are many ways to do it - a plugin, a subagent, agent, command... figuring out the "best" way. In those cases, it helps to preload all docs, which are all well written and concise anyway.

The idea being that opencode can proactively help users make the most of opencode, or add a feature, or in my case figure out how to transpose things from other clients (Claude Code, Kilo, Cursor).

I believe Claude Code, as part of its system prompt or similar, has instructions on on how to look up anthropic's reference docs (which is available in .md format at URLs like https://docs.claude.com/en/docs/claude-code/hooks.md). Claude Code is much better at creating its own agents/subagents/commands etc. whereas in my experience, Opencode gets really confused and ends up creating bizarre formats, structure, frontmatter, etc. unless there are existing patterns for it to mirror.

Best performance is when you have opencode source cloned and let it research and investigate more thoroughly, but that's an inch too far for most usage.

Originally created by @kierr on GitHub (Oct 9, 2025). Originally assigned to: @thdxr on GitHub. I have found opencode isn't very good at understanding itself, especially when it comes to writing plugins or custom tools. Context7 is obviously available, as is webfetch. But since collating all the `.mdx` docs to provide as context, performance wise it's doing a much better job "on itself". Context7 works sometimes but it's often too narrowly scoped, I've found an information dump far more effective. A usage example is asking "In opencode, how can I run a linter after each file edit and have any violations fixed immediately". Or questions where there are many ways to do it - a plugin, a subagent, agent, command... figuring out the "best" way. In those cases, it helps to preload all docs, which are all well written and concise anyway. The idea being that opencode can proactively help users make the most of opencode, or add a feature, or in my case figure out how to transpose things from other clients (Claude Code, Kilo, Cursor). I believe Claude Code, as part of its system prompt or similar, has instructions on on how to look up anthropic's reference docs (which is available in .md format at URLs like https://docs.claude.com/en/docs/claude-code/hooks.md). Claude Code is much better at creating its own agents/subagents/commands etc. whereas in my experience, Opencode gets really confused and ends up creating bizarre formats, structure, frontmatter, etc. unless there are existing patterns for it to mirror. Best performance is when you have opencode source cloned and let it research and investigate more thoroughly, but that's an inch too far for most usage.
Author
Owner

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

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

  • #2225: Automatically load @ referenced files in AGENTS.md into context - discusses improving context loading for opencode self-understanding
  • #1490: The Manual Instructions in AGENTS.md seems to only work for relative references in the current project - addresses similar documentation access issues
  • #2965: How to reference other mds in the md of Subagents by using @? - related to documentation referencing and agent creation
  • #2185: Hooks for commands (Plugin Commands) - discusses plugin development challenges that relate to opencode understanding itself

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

@github-actions[bot] commented on GitHub (Oct 9, 2025): This issue might be a duplicate of existing issues. Please check: - #2225: Automatically load @ referenced files in AGENTS.md into context - discusses improving context loading for opencode self-understanding - #1490: The Manual Instructions in AGENTS.md seems to only work for relative references in the current project - addresses similar documentation access issues - #2965: How to reference other mds in the md of Subagents by using @? - related to documentation referencing and agent creation - #2185: Hooks for commands (Plugin Commands) - discusses plugin development challenges that relate to opencode understanding itself Feel free to ignore if none of these address your specific case.
Author
Owner

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

not really right now.

You can tell it to look at https://opencode.ai/docs but we don't really prompt for this currently

@rekram1-node commented on GitHub (Oct 9, 2025): not really right now. You can tell it to look at https://opencode.ai/docs but we don't really prompt for this currently
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2027