Connect OpenCode
OpenCode already pauses a gated tool itself and emits a permission event on its HTTP API. Ony.ai attaches to your own running OpenCode server and answers those asks by phone. There are no hooks to install and no server to spawn: Ony.ai attaches to the server you already run.
Prerequisite: enroll the connector
Section titled “Prerequisite: enroll the connector”pip install onyony enroll --url <your-ony-url> --email <you>You are prompted for the password; it is never accepted on the command line. New to Ony.ai? See the quickstart.
Attach
Section titled “Attach”Start (or already have) an OpenCode server running, then attach Ony.ai to it:
ony opencode --url http://127.0.0.1:4096http://127.0.0.1:4096 is the default opencode serve address; pass whatever URL your server (or
the TUI) exposes. Ony.ai catches up on any already-pending asks first, then follows the live event
stream. Press Ctrl-C to detach at any time; OpenCode simply returns to its own prompt.
How it decides
Section titled “How it decides”Each permission ask is answered by phone according to the current /ony mode, and
the mode is re-read on every ask, so an ony away / ony here toggle takes effect live:
away- phone me for every ask.on- phone me only for high-risk actions; routine asks stay on your own OpenCode prompt.off- answer nothing; OpenCode uses its own prompts.
Ony.ai only ever replies once (allow this one time) or reject. It never sends OpenCode’s
always reply: a standing, session-wide grant is exactly the blanket approval Ony.ai’s no-approval-cache
rule forbids. Every decision is a single per-action verdict.
Fail-closed behavior
Section titled “Fail-closed behavior”Not replying is always safe for OpenCode - it just keeps waiting on its own prompt. But when Ony.ai is
attached in away mode there is nobody at the terminal to catch an unanswered ask, so an undecided
or unanswered decision fails closed to reject. In on mode, an unanswered high-risk ask is left
to OpenCode’s own prompt instead of being rejected out from under you.
Verify and troubleshoot
Section titled “Verify and troubleshoot”Run ony doctor to confirm enrollment, server reachability, signing, and carrier readiness. If Ony.ai
never calls or rings too much, see troubleshooting.