All agent CLIs
OpenCode in NeuroSquad

OpenCode,with a canvas around it

Run as many OpenCode sessions as you need, each in its own card with a real terminal. A small NeuroSquad plugin reports what OpenCode is doing, so the card knows when it works, asks or finishes — and arrows hand it browsers, terminals, notes and other agents.

Official siteopencode.ai
  • The real opencode CLI, your own providers
  • Nothing written to ~/.config/opencode
  • Free Zen models work without a key
Plugin events

It knows when OpenCode is done — and when it’s asking

OpenCode draws its screen with cursor positioning, so reading the terminal would be guesswork. Instead each card loads a NeuroSquad plugin that relays OpenCode’s own events for the main session.

session.status: busyplugin event
Working

The main session goes busy. The card’s icon spins and the Squad status card counts it as working. Subagent sessions don’t count as a turn.

permission.askedplugin event
Needs you

OpenCode asks for a permission or puts a question to you. The toast leads with it — “bash — rm -rf dist”. An ask that --auto answers within 700 ms is never reported.

session.status: idleplugin event
Finished

The main session goes idle: the turn is over. The next queued prompt goes out, the journal gets the answer and a toast says it’s done.

Its own words in the toast

A permission reads as the tool and its command, path or URL; a question reads as the question itself.

One status everywhere

The card, the sidebar, the Squad status card, custom cards and the phone all read the same status.

One plugin file for every card

The plugin lives in NeuroSquad’s data folder and is loaded by URL from the card’s config. Your own plugins keep running.

Watch it work

Three things you’ll do every day

Replicas of the app, played step by step. When OpenCode asks for permission, the answer is yours.

OpenCode fixes a failing test in the connected terminal, asks before deleting a folder, and goes idle — the journal writes itself.

Everything it gets

Everything OpenCode can do in NeuroSquad

OpenCode is supported on the same level as Claude Code: exact status, arrows, canvas mode, sessions that resume. What it can’t do is listed too.

  • 01

    Knows its state

    A NeuroSquad plugin relays OpenCode’s own events, so nothing is guessed from a quiet terminal.

  • Finished and waiting are different

    The plugin reports session.status busy and idle of the main session and permission.asked / question.asked. Answering an ask sets the card back to working.

    Docs: Finished and waiting are different
  • A notification that says what it needs

    The toast leads with OpenCode’s ask — OpenCode needs your permission: bash — rm -rf dist or OpenCode is asking: …. A click flies to the card.

    Docs: A notification that says what it needs
  • Sessions that resume

    The plugin reports the session id on every turn; the next launch opens it with --session. If the session was deleted, the card starts a fresh one by itself. “Restart session” gives it a clean one.

    Docs: Sessions that resume
  • The Squad status card

    Every AI agent of the workspace on one card, with its model — from the last request, the card’s own model or your OpenCode config — and the live time of its turn.

    Docs: The Squad status card
  • Custom cards can follow it

    Cards built with the Card SDK see the same statuses and turn events and read its replies from OpenCode’s own database.

    Docs: Custom cards can follow it
  • 02

    Works through the canvas

    An arrow from the card is a set of tools. Draw it, and OpenCode sees them on its next turn — no restart.

  • Arrows are tools, live

    An arrow to a browser, terminal, note or another agent gives OpenCode neurosquad_browser_*, terminal_*, note_* or agent_*. OpenCode re-reads the tool list, so a new arrow works on the next turn.

    Docs: Arrows are tools, live
  • It can add cards itself

    canvas_spawn_card opens a terminal, a browser, a note or another OpenCode helper — with its first prompt — already joined by an arrow.

    Docs: It can add cards itself
  • Canvas mode that holds

    Its config denies bash, webfetch and websearch, which hides them from the model. --auto only approves what isn’t denied, so this survives dangerous mode too.

    Docs: Canvas mode that holds
  • MCP servers from the registry

    Servers you install reach OpenCode through a second server, ns-connected, whose tools are set to ask — OpenCode confirms every call to them.

    Docs: MCP servers from the registry
  • Skills from skills.sh

    An arrow to a skill card gives OpenCode neurosquad_skill_load without a restart, with each skill and when to use it.

    Docs: Skills from skills.sh
  • 03

    Built for long runs

    Context, limits and follow-ups are handled on the card, with answers read from OpenCode’s own database.

  • Context meter and Compact

    The ring shows the last request’s tokens against the model’s window from OpenCode’s models.dev cache. Compact sends /compact.

    Docs: Context meter and Compact
  • Continues after a usage limit

    OpenCode rides out short 429s itself. A real account or free-tier limit goes to the card: it counts down to the reset and sends “continue” then.

    Docs: Continues after a usage limit
  • Prompt queue

    Line up the next messages: each goes out when the main session goes idle — exactly, never on a pause mid-thought.

    Docs: Prompt queue
  • Hand off to a fresh agent

    When a session is full, start a new agent beside it — OpenCode or any other CLI — with a summary typed in, ready for you to send.

    Docs: Hand off to a fresh agent
  • Journal

    Each finished answer, read from OpenCode’s database, is added to a connected note: a running log written without asking the agent to.

    Docs: Journal
  • 04

    Works in a team

    Several OpenCode agents — or a mix of CLIs — on one project without stepping on each other.

  • Isolated worktrees

    Give an agent its own git worktree, so parallel agents never edit the same files. A setup command and files to copy prepare it before OpenCode starts.

    Docs: Isolated worktrees
  • Add a reviewer

    One click starts an agent on a different CLI in the same worktree, with an arrow from the author and a prompt to review without editing anything.

    Docs: Add a reviewer
  • Dangerous mode, per card

    For a run you trust, a card can start OpenCode with --auto: permission asks are approved. Off by default.

    Docs: Dangerous mode, per card
  • One instructions file

    OpenCode reads AGENTS.md itself. NeuroSquad keeps it mirrored to the other CLIs’ files and never overwrites a changed one without the diff.

    Docs: One instructions file
  • From your phone

    Scan a QR code and the whole canvas opens in the phone’s browser: read OpenCode’s terminal, answer its ask, send the next prompt.

    Docs: From your phone
  • 05

    Models, cost and control

    Which model it runs on, what it spends and what it may spend.

  • Free models, no key

    OpenCode’s free Zen models, such as big-pickle, run in a card without any key — a good way to try a squad.

    Docs: Free models, no key
  • OpenRouter models

    Run a card on an OpenRouter model with --model openrouter/<slug>. The key goes only into that card’s environment, never into arguments or logs.

    Docs: OpenRouter models
  • Usage and cost per card

    Read from OpenCode’s own database, with the cost it records. Subagent sessions fold into their root, and each session belongs to the card whose plugin reported it.

    Docs: Usage and cost per card
  • Budget brake

    A limit per workspace. Past it, the turn is interrupted — the session is kept — and automatic prompts stop. Raise the limit and it’s lifted; your own typing is never blocked.

    Docs: Budget brake
  • Dictation into the prompt

    Hold a hotkey and speak. Speech is recognised on your machine and typed into the active agent’s prompt.

    Docs: Dictation into the prompt
  • 06

    Differs from Claude Code

    What OpenCode itself doesn’t allow, and what NeuroSquad does about it. Nothing here is hidden.

  • No session id chosen up front

    OpenCode makes its own ses_… ids and can’t start a session with one you pick. So the card learns the id from the plugin on the first turn; a card that never ran a turn starts fresh.

    Docs: No session id chosen up front
  • Interrupted with Escape, not Ctrl+C

    Ctrl+C on an empty OpenCode prompt quits the app. The budget brake presses Escape twice instead — the turn stops, OpenCode stays open.

    Docs: Interrupted with Escape, not Ctrl+C
  • Zen’s free tier can refuse

    Zen sometimes answers 403 “free tier can only be used from within OpenCode” for a free model. That’s their throttling, not the card’s config — switching model helps.

    Docs: Zen’s free tier can refuse
  • OpenCode updates itself

    OpenCode upgrades itself on patch releases unless you turned that off. NeuroSquad leaves that choice to you.

    Docs: OpenCode updates itself
  • Stable on Windows

    An old note said OpenCode crashes in Windows terminals. On 1.18.32 an hour of use — five cards, subagents, 60 resizes in a row, restarts — didn’t crash once.

    Docs: Stable on Windows
At a glance

Who’s waiting, and what it cost

Two cards that answer the questions you ask most when several OpenCode sessions run at once.

The Squad status card

Every agent of the workspace with its status, model and turn time. The one waiting on you comes first, with what it asks. Tap a status to filter.

  • coupon-fixOpenCodebig-pickleOpenCode needs your permission: bash — rm -rf distNeeds you2:34
  • refundsOpenCodeclaude-sonnet-4.5Move refunds to the new clientWorking11:07
  • refund-testsOpenCodebig-pickleWrite the refund testsWorking5:25
  • docs-passOpenCodeqwen3-coderUpdate the READMEFinished3 min. ago

Usage & cost

Read from OpenCode’s own database on your disk and matched to the card by the sessions its plugin reported. The rows always add up to the total.

AgentTokensCost
refunds912,466$2.41
docs-pass204,318$0.19
coupon-fix583,902$0.00
Total1,700,686$2.60
Exact to the picodollar; rounded only on screen.Cost as OpenCode recorded it: free Zen models show $0.00.
Under the hood

The real OpenCode, plus one config file

NeuroSquad starts the same OpenCode you run yourself, in a real terminal in the card. This is everything it adds:

What NeuroSquad adds to the command
❯ opencode
--session <ses_… id>later launchesthe session its plugin last reported, reopened
OPENCODE_CONFIG=<this card’s config>every launchthis card’s config: NeuroSquad’s MCP servers, their permissions, the plugin
OPENCODE_PURE=falseevery launchso the plugin loads even if NeuroSquad was started from `opencode --pure`
permission: bash, webfetch, websearch → denycanvas modewritten into that config: its own shell and web denied
--autodangerous modeapprove permission asks

Nothing written to ~/.config/opencode

The config is a per-card file in NeuroSquad’s data folder, named by OPENCODE_CONFIG. Your own global and project configs still apply.

No secret in the file

The MCP token is written as {env:NEUROSQUAD_MCP_TOKEN}; OpenCode fills it in from the card’s environment.

Found where you installed it

A real opencode.exe first; behind npm’s opencode.cmd the exe it wraps is started directly, so stopping the card stops OpenCode.

FAQ

OpenCode in NeuroSquad, answered

Give OpenCode a canvas

Free for Windows 10 and 11. Your code, your providers and your costs stay on your machine.