Skip to content
Harnesses

OpenCode 2

Install, verify and troubleshoot AgentFeedback for OpenCode 2.

Connect OpenCode 2 to your local AgentFeedback inbox, or to the server you already configured. The installer changes this user's harness configuration; it does not install OpenCode 2 itself.

Before you start

Install the binary with the local quickstart, then make sure agentfeedback version works in the terminal where you run your harness. For a team inbox, configure the client with the self-hosted quickstart first; installation keeps that server configuration.

These commands automate setup on macOS and Linux. On Windows, install exits with code 2 and prints manual skill, MCP and instruction-file steps for the named harness. Follow those steps instead; hooks are not wired on Windows.

Install

Preview the files and commands, then apply the installation:

agentfeedback install opencode-v2 --dry-run
agentfeedback install opencode-v2

agentfeedback init is the interactive alternative: it detects installed harnesses, asks which to wire and checks the result. Do not install the same skill through a marketplace as well.

What gets configured

  • Detected by: opencode reporting 2.x
  • Skill file: <opencode>/skills/agentfeedback/SKILL.md
  • Hooks: plugin <opencode>/plugins/agentfeedback.js (on ctx.tool.hook("execute.after") for shell, and session.execution.succeeded, which delivers the note as a session instructions entry)
  • Session reminder: not supported
  • Instruction file: <opencode>/AGENTS.md
  • MCP configuration: mcp.servers.agentfeedback in the first of opencode.jsonc, opencode.json that has an mcp member, else an existing opencode.jsonc, else opencode.json

In the hook descriptions, “note” means a nudge asking the agent to consider reporting a tool failure; it is not a report submitted automatically.

Using MCP instead of the CLI skill

Choose this only if you want tools over MCP instead of the skill and hooks:

agentfeedback install opencode-v2 --mcp

With no server configured, this registers agentfeedback mcp over stdio. With a server configured, it registers the server URL. See MCP modes and credentials before switching an existing installation.

For remote MCP, set AGENT_FEEDBACK_API_KEY in the environment that launches the harness, using the server key you received privately. The key in the client configuration is not used by remote MCP. Restart the harness after setting the variable; never paste the key into an agent conversation or commit it.

Verify

Start a new harness session after installation, then inspect the wiring and exercise the configured inbox:

agentfeedback install --list
agentfeedback doctor
agentfeedback doctor --e2e

install --list should show this harness and the intended binary or MCP endpoint. Resolve any doctor warnings. The end-to-end check submits an install-check record; normal lists hide these records. It checks the reporting path, not whether the harness actually loaded the skill or fired a hook.

In OpenCode 2, confirm that the AgentFeedback skill or MCP tools are available. Ask the agent to file one clearly labelled setup report, then use agentfeedback list --open (or agentfeedback ui) to find it. Do not infer that hooks work just because the command-line check passed.

Troubleshooting

  • Harness not detected: check the executable and configuration directory listed above. Run installation as the same OS user who runs the harness.
  • Foreign or edited entry: the installer refuses to overwrite a skill, hook or MCP entry it does not own. Inspect the named path and remove the old integration through its original installer, or move it aside deliberately, before retrying.
  • Different binary versions: install --list shows the binary a hook runs. Keep it aligned with agentfeedback on your PATH, then rerun the install command after upgrading.
  • No automatic flush: harnesses without hooks, and skill-only installations, need agentfeedback flush periodically when using a server.

Remove the integration

agentfeedback uninstall opencode-v2 --dry-run
agentfeedback uninstall opencode-v2

Uninstall removes the entries it owns, leaving unrelated configuration and your reports intact. If you changed an installed file, inspect the manual steps it prints. On Windows, uninstall also exits 2: undo the manual installation steps yourself, removing only the AgentFeedback skill, MCP entry and instruction text.

Source and verification

Live-checked on 2026-11-09: the adapter was exercised against the real harness. This is upstream's recorded verification level, not a claim that every setup above was live-tested by this site.

Source: integration registry and operating guide, pinned at c7573e1.