OpenCode
What an OpenCode session materialises, the init flag that makes it the hall's provider, and how a discovery session starts there.
Setup is harness-agnostic — see the quickstart for creating a hall and opening your first session. This page covers what is specific to OpenCode once you're there.
For the end-to-end flow with this harness across repos, see Use OpenCode with multiple repositories.
What lands in .opencode/
An OpenCode session materialises a .opencode/ directory at the view
directory's root, alongside the promoted repos:
.opencode/skills/ carries every skill from both roots — the hall's committed
skills and your personal ones — materialised under its bare id; the directory
itself is gitignored because each child is a derived symlink back into .ivar/.
AGENTS.md is the provider-native instructions file OpenCode reads at startup.
opencode.json is OpenCode's general config — model, permissions — and ivar
adds its $schema key without touching those. It does own the mcp key: every
sync rewrites it in full from ivar.json. See MCP servers.
The read-only guard for repos you haven't promoted is enforced by
.opencode/plugins/ivar.js, which runs ivar guard --provider opencode before
each tool call. It's a real plugin plus a real
cleared write bit — not a prompt asking the agent to behave.
Memory hooks
.opencode/plugins/ivar-memory.js spawns ivar memory capture --provider opencode for each event and appends it to the hall's capture spool. OpenCode
has no session end, so no session.ended is recorded, and it has
no session-start brief: its plugins cannot add context when a session starts,
so ivar memory brief never runs there. The ivar MCP server's instructions ask
the agent to call memory_handoff_list and memory_message_list instead.
When memory.capture is false in ivar.json, ivar sync writes no
capture hook; while capture is on, ivar doctor reports a missing one as
provider.capture_hook_missing. See Hall memory.
Add it to an existing hall
The quickstart covers ivar init. If
the hall already exists with a different provider, add OpenCode alongside it:
ivar provider add opencodeWhere ivar-explore comes from
It is a skill materialised into .opencode/skills/ivar-explore/, so OpenCode
loads it from your request; there is no slash command to type.