onpath × O OpenCode integration

Monitor OpenCode,
locally.

Wrap opencode with onpath and monitor each session you run through it. Add the tested project plugin when you need structured action events and native pre-action Guard decisions.

Works with the OpenCode CLI from OpenCode · stable
zsh — OpenCode command walkthrough
# one prefix — OpenCode runs exactly as normal
$ onpath run -- opencode run "add a redis cache layer"
↳ illustrative session · local recording active
# onpath watches the stream and flags stuck loops
⚠ no-progress-session · 8m idle · a2c8·19 · recovery prompt ready
# preview, install, and inspect the native project plugin
$ onpath integrate opencode --workspace . --preview
$ onpath integrate opencode --workspace .
What onpath catches in OpenCode

Repeated failures

Same test, same error, on repeat — caught by failure signature.

warn

Edit loops

The same path edited repeatedly without a successful command.

warn

No progress & time budget

Configured session budgets crossed without successful progress.

warn
How onpath works with OpenCode

Three steps. Nothing changes about how OpenCode runs.

onpath sits between you and the opencode CLI — observing, recording, and reporting without altering the agent's behavior.

STEP 01

Wrap the command

Prefix any OpenCode invocation. onpath spawns it as a child process and watches the stream.

$ onpath run -- opencode
STEP 02

Detect locally

Commands, exits, and edits stream to local SQLite. Detectors flag stuck patterns in real time.

.onpath/events.sqlite
STEP 03

Add structured project hooks

Install the owned OpenCode plugin only after the local version passes the exact compatibility probe.

$ onpath integrate opencode --workspace .
Native project integration

Structured OpenCode actions, with an explicit enforcement boundary.

The project-owned OnPath plugin emits pre-action, post-action, and failure evidence. Native Guard can return allow or deny before a supported tool runs; wrapper mode remains the fallback when the exact OpenCode version is not tested.

Structured evidenceLifecycle, tool input metadata, result status, and failure signals enter the local journal.
Native pre-action GuardSupported tool calls can be allowed or denied before execution under the resolved local policy.
Owned and reversiblePreview mutations first; removal deletes only OnPath-owned project configuration.
OpenCode · native integration
# inspect planned project mutations
$ onpath integrate opencode --workspace . --preview
# install, then inspect negotiated capabilities
$ onpath integrate opencode --workspace .
$ onpath integrate status --workspace .
Compatibility

OpenCode support at a glance.

onpath wraps the opencode CLI on macOS and Linux. Everything runs locally — no agent API keys are shared with onpath.

Invocationonpath run -- opencode
Event capturecommands · exits · edits · timings
Native project pluginonpath integrate opencode --workspace .
Data handlinglocal SQLite · sync opt-in
Statusstable
More integrations

onpath works with your whole agent stack.

Use the same prefix and the same dashboard across every coding agent on your team.

Put OpenCode on path.

Local-first. Open-core. Two minutes to install and one prefix to start.

$onpath run -- opencode