Skip to content

OpenCode adapter; drop Codex and Copilot (plugin 2.4.0) - #9

Merged
consteuni merged 2 commits into
mainfrom
feat/opencode-adapter
Nov 23, 2026
Merged

consteuni merged 2 commits into
mainfrom
feat/opencode-adapter

Conversation

@consteuni

@consteuni consteuni commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

What

Drops the Codex and GitHub Copilot support added in 2.3.0 (user decision) and adds an OpenCode adapter. Plugin 2.4.0.

Removed: the six agents/openai.yaml, the guard's "deny" mode, the context hook's Copilot key, the Codex/Copilot checks, their mock handler, the CI installs. core/bin/* are byte-identical to 2.2.1. The 2026-11-20 results entry stays as history, marked superseded.

Added: adapters/opencode/index.ts, one file with no rule of its own:

  • rules and saved state: runs core/bin/dev-brain-context --text through the context hook, main session only (subagents detected by parentID);
  • git guard: runs core/bin/dev-brain-guard through the permission evaluate hook and answers "ask"; if the script cannot run, the command is asked, not allowed;
  • skills: registers core/skills, workflows hidden (autoinvoke from disable-model-invocation), still loadable by id;
  • reviewer: built from core/agents/reviewer.md (body = system prompt, tools line = permissions). OpenCode's shell matcher does not parse redirections, so * --output* and *>* are denied by name.

Install is by path (plugins in opencode.json); the README and MANUALE (section 12) document install, update, removal and opencode debug agents as the check.

Evidence

  • python3 evals/offline/check.py ALL PASS, 20 checks (11 Claude Code 2.1.325, 9 OpenCode 2.3.2), 26 s, also on a clean clone.
  • Six mutations each fail the intended check: no context hook, context for subagents, no guard, no redirection denies (3/5 rejected), workflows offered, no reviewer.
  • CI: pinned job success on this PR; a manual run of the branch passed both jobs, and latest resolved to Claude Code 2.1.330 and OpenCode 2.4.0.
  • The adapter type-checks against the 2.3.2 plugin types. claude plugin validate core passes with the same warnings as main.

Limits (NOT RUN)

  • The OpenCode TUI: the interactive "ask" prompt and @start are untested; in opencode run an ask is rejected and @start is not expanded (the skill tool loads start by id).
  • opencode run --auto approves the guard's ask (observed: the commit ran).
  • OpenCode 1.x. CI pins 2.3.2 on pull requests and runs @latest weekly.
  • No real model on any host.

https://claude.ai/code/session_01Sm3JtGSXFLR6CZYVJXGHtU


Generated by Claude Code

Removes the 2.3.0 host-specific code (openai.yaml, guard deny mode, Copilot
context key, their checks and CI installs); core/bin is identical to 2.2.1.

Adds adapters/opencode/index.ts, a thin OpenCode plugin over core/: it runs
dev-brain-context for the main session only, runs dev-brain-guard through the
permission hook (ask), registers core/skills with workflows hidden, and builds
the reviewer from core/agents/reviewer.md with read-only permissions plus
explicit denies for redirections, which OpenCode's shell matcher ignores.

Offline check: 20 checks (11 Claude Code, 9 OpenCode 2.3.2); six adapter
mutations each fail the intended check. TUI and OpenCode 2.4.0 are NOT RUN.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm3JtGSXFLR6CZYVJXGHtU
A manual run of the branch resolved @latest to Claude Code 2.1.330 and
OpenCode 2.4.0 and passed all 20 checks, so 2.4.0 is no longer NOT RUN.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sm3JtGSXFLR6CZYVJXGHtU
@consteuni
consteuni merged commit 2fc3c7e into main Nov 23, 2026
2 checks passed
@consteuni
consteuni deleted the feat/opencode-adapter branch November 23, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants