Summary
Three OpenCode drifts as of v1.18.14: two canonical hook events (notification, permissionDenied) have faithful upstream plugin counterparts but are unmapped, and the stable references config key — a genuine context-provisioning surface — has no rulesync coverage. Additionally, the OpenCode V2 beta restructures nearly every key rulesync emits and deserves a tracking note.
Canonical repo note: sst/opencode 301-redirects to anomalyco/opencode (same repository id). Latest stable at research time: v1.18.14 (2026-08-05).
Recent Releases
Gaps
1. hooks — canonical notification unmapped despite tui.toast.show
- Upstream: the plugin API exposes
tui.toast.show (payload: message, variant info/success/warning/error, optional title, duration) — https://opencode.ai/docs/plugins/
- rulesync (
project, global): notification is mapped for many other tools but absent from OPENCode_HOOK_EVENTS (src/types/hooks.ts:323) and CANONICAL_TO_OPENCODE_EVENT_NAMES (:1115), so OpenCode users get no plugin stub for it.
- Follow-up: add
notification to the event set and map it to tui.toast.show.
2. hooks — canonical permissionDenied unmapped despite permission.replied
- Upstream:
permission.replied carries sessionID, requestID, and reply ("once" | "always" | "reject"), so denial is distinguishable — https://opencode.ai/docs/plugins/
- rulesync: maps
permissionRequest → permission.asked but nothing to permission.replied.
- Follow-up: gate on
reply === "reject" using the same mechanism as SHELL_EVENT_TOOL_GATES in src/features/hooks/opencode-style-generator.ts. Because KILO_HOOK_EVENTS aliases the OpenCode set (src/types/hooks.ts:345), this lands for Kilo too.
3. rules — the references config key has no coverage
- Upstream:
references (stable V1; renamed from deprecated reference in v1.17.1) maps an alias to a local path or a git repository (+ branch), with description and hidden; entries carrying a description are injected into the agent's system context automatically — a context-provisioning surface alongside instructions, not just autocomplete. https://opencode.ai/docs/references/
- rulesync: writes
instructions into opencode.json but never touches references.
- Follow-up: discretionary — decide whether rulesync should author
references (most likely via a tool-scoped opencode section). This is a new capability rather than a fix.
4. Forward-looking — V2 beta restructures nearly every emitted key
Per https://opencode.ai/v2/docs/migrate-v1: permission/tools → ordered permissions array, agent → agents, command → commands, plugin → plugins, reference → references, agent prompt → system, disable → disabled, permission actions bash → shell / task → subagent, MCP enabled → inverted disabled, timeout split into timeout.catalog/timeout.execution. V1 config is not auto-migrated and the binary is separate (opencode2), so this would be a new target id, not a change to the existing adapters. Track; do not implement while the APIs are marked unstable.
Proposed Follow-up
- Map
notification → tui.toast.show and permissionDenied → gated permission.replied (fixes Kilo simultaneously).
- Decide on
references authoring.
- Keep a watch on V2 GA for an
opencode2 target.
References
Summary
Three OpenCode drifts as of v1.18.14: two canonical hook events (
notification,permissionDenied) have faithful upstream plugin counterparts but are unmapped, and the stablereferencesconfig key — a genuine context-provisioning surface — has no rulesync coverage. Additionally, the OpenCode V2 beta restructures nearly every key rulesync emits and deserves a tracking note.Canonical repo note:
sst/opencode301-redirects toanomalyco/opencode(same repository id). Latest stable at research time: v1.18.14 (2026-08-05).Recent Releases
cwdfor local servers (already followed).referencerenamed toreferences(gap 3 below).opencode2binary via@opencode-ai/cli@next— https://opencode.ai/v2/docs (gap 4).Gaps
1. hooks — canonical
notificationunmapped despitetui.toast.showtui.toast.show(payload:message,variantinfo/success/warning/error, optionaltitle,duration) — https://opencode.ai/docs/plugins/project,global):notificationis mapped for many other tools but absent fromOPENCode_HOOK_EVENTS(src/types/hooks.ts:323) andCANONICAL_TO_OPENCODE_EVENT_NAMES(:1115), so OpenCode users get no plugin stub for it.notificationto the event set and map it totui.toast.show.2. hooks — canonical
permissionDeniedunmapped despitepermission.repliedpermission.repliedcarriessessionID,requestID, andreply("once" | "always" | "reject"), so denial is distinguishable — https://opencode.ai/docs/plugins/permissionRequest→permission.askedbut nothing topermission.replied.reply === "reject"using the same mechanism asSHELL_EVENT_TOOL_GATESinsrc/features/hooks/opencode-style-generator.ts. BecauseKILO_HOOK_EVENTSaliases the OpenCode set (src/types/hooks.ts:345), this lands for Kilo too.3. rules — the
referencesconfig key has no coveragereferences(stable V1; renamed from deprecatedreferencein v1.17.1) maps an alias to a localpathor a gitrepository(+branch), withdescriptionandhidden; entries carrying adescriptionare injected into the agent's system context automatically — a context-provisioning surface alongsideinstructions, not just autocomplete. https://opencode.ai/docs/references/instructionsintoopencode.jsonbut never touchesreferences.references(most likely via a tool-scopedopencodesection). This is a new capability rather than a fix.4. Forward-looking — V2 beta restructures nearly every emitted key
Per https://opencode.ai/v2/docs/migrate-v1:
permission/tools→ orderedpermissionsarray,agent→agents,command→commands,plugin→plugins,reference→references, agentprompt→system,disable→disabled, permission actionsbash→shell/task→subagent, MCPenabled→ inverteddisabled,timeoutsplit intotimeout.catalog/timeout.execution. V1 config is not auto-migrated and the binary is separate (opencode2), so this would be a new target id, not a change to the existing adapters. Track; do not implement while the APIs are marked unstable.Proposed Follow-up
notification→tui.toast.showandpermissionDenied→ gatedpermission.replied(fixes Kilo simultaneously).referencesauthoring.opencode2target.References