Who it is forA developer tracing a bug or behavior across many files who does not want to run each search by hand.
The problemComplex searches across a repo take many steps, and it is slow to do each one manually.
The outcomeThe general subagent returns the search results it found, so you can decide the next change.
What you need first
- A terminal on macOS, Linux, or Windows, or the desktop app installer for your platform
- One package manager available: npm, bun, pnpm, yarn, or brew
- A local project folder you want the agent to work in
- Configuration for OpenCode as described in the docs at opencode.ai/docs (the README only links to them)
Steps
- Run
npm i -g @opencode/cli@latest. - Change into the project folder and start OpenCode with
opencode. (inferred, check the README) - Type a message that starts with
@generaland describe the search, for example where a setting is read and written. - Review the results it returns and ask follow-up questions in the same session.
Prompt for your agent
In the anomalyco/opencode CLI, send a message beginning with @general asking it to find every place <symbol-or-setting> is read or written in <project-path>. Expected output: a list of file paths and line references with a one-line note on each. Verify by opening two of the listed files and confirming the references match.
Caveat. The README says the general subagent is used internally, so do not expect a documented way to configure it beyond invoking it with @general.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for anomalyco/opencode and "Hand multistep code searches to a subagent"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer