Read-only Ask agent for OpenCode v2.
It answers questions without modifying the project, and appears alongside
Build / Plan in the TUI agent cycle (Shift+Tab, Ctrl+X A, /agents).
edit *→deny(never creates, edits, or deletes files)shell *→ask(running tests orgit statuspops one approval, then answers — e.g. “are tests green?”)subagent→denyexceptexplore(can't escalate to a writing agent)question→allow- Model-call guard: when the session agent is
ask, thewrite/edit/patchtools are stripped from the request and a read-only reminder is appended to the system prompt.
opencode plugin add @sandlada/opencode-askOr manually in opencode.jsonc:
Then restart the service (or the TUI) and run /agents — ask shows up as a
primary agent.
Switch to Ask and ask anything read-only:
how does auth work in this project?
are tests green?
If you ask for a code change, it explains the plan and asks you to switch back
to Build (or Plan) instead of editing.
pnpm install
pnpm typecheck
pnpm buildVerify locally without publishing:
mkdir /tmp/ask-check
printf '{ "$schema": "https://opencode.ai/config.json", "plugins": ["%s"] }' "$PWD" > /tmp/ask-check/opencode.jsonc
cd /tmp/ask-check && opencode debug agentsask should appear with mode: primary, edit: deny, shell: ask.
MIT © Kai Orion & Sandlada — see LICENSE.
{ "$schema": "https://opencode.ai/config.json", "plugins": ["@sandlada/opencode-ask"] }