Compatibility audit against opencode 1.18.5 (2026-07-26) found nothing broken — the plugin runs a full live turn on it, and src/opencode-types.ts (our hand-written structural mirror) still matches. Details are in AGENTS.md's compatibility gotcha.
What the audit did surface is new opencode surface that overlaps things this plugin hand-rolled. Each item below is an independent evaluation, none is urgent:
1. v2 plugin API
@opencode-ai/plugin/v2 ships effect + promise flavors with a PluginContext exposing aisdk, catalog, agent, skill, command, reference, integration hooks (each with Reload). v1 Plugin is still supported and is what we use. Question: does registering our provider/models through catalog/aisdk buy anything (hot reload of the model list? cleaner account-provider expansion?) or is it churn? Do not migrate without a concrete win.
2. Long-context pricing tiers
The model schema gained optional cost.tiers ({ tier: { type: "context", size } }) and cost.experimentalOver200K. Most entries in src/models.ts declare context: 1_000_000, and Anthropic prices requests above 200K input tokens differently for the long-context models. Verify the current published numbers (see the claude-api reference, not memory) and decide whether to declare tiers so opencode's cost accounting stops understating big-context turns. Note the (N×) display-multiplier convention in defineModel assumes one flat ratio — check how a tiered model should render before changing names.
3. tool.definition hook
(input: { toolID }, output: { description, parameters }) lets a plugin overlay tool descriptions/params. We already overlay proxy-tool descriptions ourselves inside src/proxy-mcp.ts. Not obviously better, but worth knowing it exists if we ever need to adjust an opencode-native tool's description.
4. Compaction hooks
experimental.session.compacting ({ context: string[], prompt? }) and experimental.compaction.autocontinue ({ enabled }). We detect /compact via opencodeAgent === "compaction" in chat.params and run our own auto-continue nudge. The autocontinue hook in particular is adjacent to shouldAutoContinueIncompleteTurn — check for double-continue interaction before doing anything here.
5. Smaller notes
capabilities.interleaved gained a field: "reasoning" variant; our type mirror only lists reasoning_content / reasoning_details. Harmless (we set interleaved: false), but widen the mirror if we ever use it.
PluginInput gained serverUrl: URL and $: BunShell. Neither is needed today; serverUrl does not expose a version route (checked every route in sdk.gen.js).
experimental.chat.system.transform, chat.headers, permission.ask exist and are unused by us.
opencode run dropped the -a shorthand for --agent, and gained --variant / --thinking / --auto / --pure / --fork / --attach. Smoke-test scripts must spell out --agent. --variant maps to our reasoning variants and is a nice way to exercise them from the CLI.
Compatibility audit against opencode 1.18.5 (2026-07-26) found nothing broken — the plugin runs a full live turn on it, and
src/opencode-types.ts(our hand-written structural mirror) still matches. Details are in AGENTS.md's compatibility gotcha.What the audit did surface is new opencode surface that overlaps things this plugin hand-rolled. Each item below is an independent evaluation, none is urgent:
1. v2 plugin API
@opencode-ai/plugin/v2ships effect + promise flavors with aPluginContextexposingaisdk,catalog,agent,skill,command,reference,integrationhooks (each withReload). v1Pluginis still supported and is what we use. Question: does registering our provider/models throughcatalog/aisdkbuy anything (hot reload of the model list? cleaner account-provider expansion?) or is it churn? Do not migrate without a concrete win.2. Long-context pricing tiers
The model schema gained optional
cost.tiers({ tier: { type: "context", size } }) andcost.experimentalOver200K. Most entries insrc/models.tsdeclarecontext: 1_000_000, and Anthropic prices requests above 200K input tokens differently for the long-context models. Verify the current published numbers (see the claude-api reference, not memory) and decide whether to declare tiers so opencode's cost accounting stops understating big-context turns. Note the(N×)display-multiplier convention indefineModelassumes one flat ratio — check how a tiered model should render before changing names.3.
tool.definitionhook(input: { toolID }, output: { description, parameters })lets a plugin overlay tool descriptions/params. We already overlay proxy-tool descriptions ourselves insidesrc/proxy-mcp.ts. Not obviously better, but worth knowing it exists if we ever need to adjust an opencode-native tool's description.4. Compaction hooks
experimental.session.compacting({ context: string[], prompt? }) andexperimental.compaction.autocontinue({ enabled }). We detect/compactviaopencodeAgent === "compaction"inchat.paramsand run our own auto-continue nudge. The autocontinue hook in particular is adjacent toshouldAutoContinueIncompleteTurn— check for double-continue interaction before doing anything here.5. Smaller notes
capabilities.interleavedgained afield: "reasoning"variant; our type mirror only listsreasoning_content/reasoning_details. Harmless (we setinterleaved: false), but widen the mirror if we ever use it.PluginInputgainedserverUrl: URLand$: BunShell. Neither is needed today;serverUrldoes not expose a version route (checked every route insdk.gen.js).experimental.chat.system.transform,chat.headers,permission.askexist and are unused by us.opencode rundropped the-ashorthand for--agent, and gained--variant/--thinking/--auto/--pure/--fork/--attach. Smoke-test scripts must spell out--agent.--variantmaps to our reasoning variants and is a nice way to exercise them from the CLI.