How it works
π Startup
Section titled βπ StartupβEvery time OpenCode starts:
So if you already have an agent called reviewer, a Copilot agent with the same name wonβt
replace it. Your own config always wins.
π¬ During a session
Section titled βπ¬ During a sessionβGeneral instructions ride along with every request. Scoped ones (with applyTo) wait until
theyβre actually relevant:
- πYou askβfix the login formβ β
copilot-instructions.mdis already attached. - βοΈThe model edits a fileIt touches
src/ui/Login.tsx. - π―A match!
react.instructions.mdhasapplyTo: "src/ui/**", so it joins the session from the next request on.
A big repo with a dozen instruction files doesnβt stuff all of them into every prompt. Files
without applyTo are skipped, because in Copilot you attach those by hand anyway.
π When files change
Section titled βπ When files changeβWith watch on (the default), save a prompt file and the new version is used the next time
you run the command. No restart.
π Agents and tools
Section titled βπ Agents and toolsβCopilot agents list the tools they may use; OpenCode uses permissions. The plugin translates one into the other, and anything not listed is denied:
search/codebaseβ
grep, glob, readweb/fetchβ
webfetchgithub/*β
GitHub MCP tools(not listed)β everything elseIf a tool name has no OpenCode equivalent, you get a warning in the log and the agent works without it.