Skip to content

Releases: naicud/opencode-plugin-cc

v1.22.0

Choose a tag to compare

@naicud naicud released this 11 Sep 09:39

Changed

  • Single-model mode: deepseek-v4.1-flash (provider opencode-go) is now the only selectable model and the default for every delegation — tier 0, default: true, variants high/low/max, $0.15/Mtok in and $0.60/Mtok out. defaults.tier stays 0 and effortPolicy runs max on it.
  • Every other model id — including the previously free tier-0 entries (x-preview-f-free, ox-alpha-free, big-pickle, hy3-free, mimo-v2.5-free, nemotron-3-ultra-free, nemotron-3.5-lightning-free) — moved to excluded in config/models.json. Requesting any of them fails with MODEL_EXCLUDED.
  • Delegation docs follow the new setup: the delegate agent, the opencode-delegation and opencode-supervision skills, and /opencode:delegate now describe single-model mode.

Notes

  • Delegation now needs a working opencode-go credential (opencode auth login).
  • Tier escalation has no target left: a failed run is retried once on the same model, then reported as BLOCKED.

v1.21.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 00:01

Added

  • Codex CLI support: the same plugin payload now installs into Codex as well as Claude Code.
    New plugins/opencode/.codex-plugin/ manifest set (plugin.json, mcp.json, hooks.json),
    Codex hook entry points under scripts/codex/, an opencode-delegate agent role
    (agents/codex/opencode-delegate.toml), and the host-neutral opencode-supervision skill that
    carries the delegate/wait/verify protocol where Codex has no markdown subagents.
  • Host adapter (scripts/lib/host.mjs): single place that knows which host is driving —
    plugin root, state directory, session id, MCP tool prefix (mcp__plugin_opencode_oc__ vs
    mcp__oc__), the workspace to anchor to, and how each host hands over the assistant response
    at Stop.
  • Codex command-skill renderer (scripts/build-codex-skills.mjs): renders the 13 slash
    commands into $CODEX_HOME/skills/opencode-<name>/SKILL.md at install time, keeping
    commands/ the single source. Frontmatter crosses intact — description, argument-hint,
    disable-model-invocation, context — with allowed-tools translated into Codex's bare-name
    vocabulary and $ARGUMENTS left for Codex to substitute natively.
  • install.sh --host claude|codex|both, defaulting to whichever host homes exist.
  • docs/codex-install.md: self-service Codex walkthrough — prerequisites,
    hook approval, verification, multi-account env_vars, upgrade, uninstall, troubleshooting.
  • docs/codex-compat.md: the verified Codex platform behaviour behind the
    packaging decisions (variable expansion, env sanitisation, tool naming, hook trust gating).

Changed

  • The delegation router hook also fires on Codex's spawn_agent, not just Claude Code's Task,
    and every advice string now names the tools with the prefix of the host it runs under.
  • OC_STATE_DIR overrides the state root on both hosts; CLAUDE_PLUGIN_DATA keeps working.

Fixed

  • The stop review gate reviewed the raw hook payload rather than the assistant's own text. It now
    reviews the real response — read from Codex's last_assistant_message or from Claude Code's
    transcript.
  • The test runner no longer treats macOS AppleDouble (._*.test.mjs) sidecars as test files.
  • install.sh no longer aborts on a bare --host with no value, and checks for node and
    python3 before it needs them.
  • The repository-structure listing in the README claimed 11 slash commands; there are 13.

v1.20.1

Choose a tag to compare

@github-actions github-actions released this 25 Aug 13:33

Fixed

  • opencode-delegate spawns outside git repositories: dropped the isolation: worktree
    frontmatter flag — Claude Code requires a git repo to create agent worktrees, so spawning
    the subagent in a non-repo cwd (e.g. $HOME) failed with "Cannot create agent worktree".
    The subagent now runs in the caller's working directory like any standard subagent; the
    OpenCode MCP tools already take an explicit absolute cwd, so no isolation is needed at
    the supervisor layer. Agent prompt now instructs it to pass cwd on every tool call and
    scope tasks with explicit in/out-of-scope paths instead of relying on worktree isolation.
  • opencode-routing skill updated to match: blast-radius scoping happens in the task text,
    not via worktree isolation.

v1.20.0

Choose a tag to compare

@naicud naicud released this 25 Aug 13:08

Added

  • Skill support across the delegation boundary: spawned OpenCode workers now receive plugin
    skills the same way Claude Code injects an agent's frontmatter skills: into its subagents.
    Spawn-time: selected skill digests are baked into the injected oc-delegate agent prompt
    (default: opencode-prompting; oc-reviewer ships none — its report format is fully pinned by
    the contract). Per-call: delegate/fanOut accept skills: string[] (subset of the five
    plugin skills, max 3, deduplicated, validated before any server spawn with SKILL_INVALID /
    SKILL_TOO_MANY); digests are appended to the task prompt under a [PLUGIN SKILLS] marker,
    so guidance also reaches sessions running under the stock build fallback. Selected skills
    are recorded on job records and echoed in tool responses. New module mcp/lib/skills.mjs
    loads SKILL.md bodies (frontmatter stripped, mtime-cached); unreadable skill files degrade
    inline instead of failing the delegation.

v1.19.0

Choose a tag to compare

@naicud naicud released this 25 Aug 13:08

Added

  • Subagent-style live supervision without progressTokens: wait and waitAll are now
    hard-capped at one 60s activity slice when the caller supplies no _meta.progressToken
    (explicit long timeoutSec values included). Every call returns a fresh snapshot — assistant
    tail, reasoning tail, last tool calls, todo counts — plus nextStep, so chaining waits streams
    a subagent-style transcript into the conversation. This also keeps every call under Claude
    Code's ~2-minute MCP auto-background threshold (CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS), which
    previously made long blocking waits mute and invisible. With a progressToken the old blocking
    behavior is unchanged (explicit timeoutSec honored, default 600s).
  • Richer timeout context: the PostToolUse delegation hook now includes the reasoning tail
    and the most recent tool-call lines in its timeout note, alongside the existing assistant tail
    and todo progress.
  • Explicit-only agent triggers: agents/opencode-delegate.md and
    skills/opencode-routing/SKILL.md now activate ONLY on an explicit user ask (subagent,
    delegation, OpenCode worker, fan-out) — never proactively. README gains a dedicated section
    documenting how to invoke the opencode-delegate subagent (natural language,
    /opencode:delegate, direct Task call) and what it costs in main-thread tokens (~400-450 per
    supervision slice; all heavy work runs inside OpenCode).

Fixed

  • e2e fan-out supervision chains multiple slice-capped waitAll passes instead of assuming one
    long blocking call reaches idle.

v1.18.1

Choose a tag to compare

@naicud naicud released this 25 Aug 13:08

Fixed

  • Fan-out report race — real-world finding: every delegate wrote the same
    <workspace>/.oc-report.md, so parallel fanOut tasks on one workspace overwrote each
    other's reports and waitAll returned identical report.content for all of them. Reports
    are now per-job files (<workspace>/.oc-reports/<jobId>.md): the contract template gains a
    ${reportPath} placeholder, delegate/fanOut prompts pin the exact path for their job, the
    empty-output nudges repeat it, and wait/waitAll read the job-specific file first (the
    legacy root .oc-report.md remains a read fallback). The hygiene reaper now also collects
    stale files under .oc-reports/ and removes the directory once empty.

v1.18.0

Choose a tag to compare

@naicud naicud released this 25 Aug 13:08

Added

  • Logs finally visible in Claude's MCP tab: the server now declares the MCP logging
    capability, answers logging/setLevel and emits notifications/message frames on every
    lifecycle event — boot, delegate/fanOut start, session idle / needs-input / failure,
    shutdown, hygiene sweeps, tool errors (throttled, zero spam). Every line is mirrored to
    stderr ([opencode:<level>] …) for claude --mcp-debug. Root cause of the silence: the
    progress frames that existed before require a caller-supplied progressToken, which Claude
    Code does not send by default.
  • Zero-litter guarantee — disk hygiene reaper: one TTL-based sweep (hygiene.mjs) now owns
    every file the plugin ever writes, running at MCP-server boot, hourly on long-lived servers,
    in the SessionEnd hook and on demand via shutdown { cleanState: true }. Five rules:
    stale per-workspace state dirs (>14d, no live tracked server), orphaned job files dropped by
    the MAX_JOBS prune, crash-leftover *.tmp.* files (base level + hash dirs + state files),
    consumed .oc-report.md reports (>7d, terminal jobs only, plugin-known workspaces only),
    abandoned oc-e2e-* / oc-demo-* / oc-bench-* dev workspaces in the OS temp dir. Safety
    rails: live pids freeze their dir, fresh files are never touched (spawn-race safe), / and
    the home directory are refused, everything is previewable with a dry run. Knobs:
    OPENCODE_STATE_TTL_DAYS / OPENCODE_REPORT_TTL_DAYS (0 disables).
  • Doctor hygiene preview: new [PASS] hygiene check shows exactly what the next sweep
    would clean (dry run, removes nothing).
  • .oc-report.md delivered inline: when a delegated session reaches idle without error,
    wait embeds the report content in the response (first call only, capped at 8k chars) —
    the supervisor reads it without an extra Read, which also makes the deferred report deletion
    safe.

Fixed

  • Windows state location: the no-env fallback built /tmp/opencode-companion, which on
    Windows resolved to C:\tmp\...; win32 now falls back to os.tmpdir() while POSIX keeps the
    literal /tmp path so existing installations do not migrate state.
  • Duplicate budget: key in the models tool result (last key silently won).

v1.17.0

Choose a tag to compare

@naicud naicud released this 25 Aug 13:08

Added

  • Orphan reaper — no more zombie servers: every opencode server the plugin spawns is
    registry-tracked (pid+port, identity-checked stops). A new reapStaleServers() sweep runs at
    MCP-server boot and in doctor (orphan-reaper check): it removes dead entries and kills —
    only after a ps-level identity match — servers orphaned by crashed/closed Claude sessions
    that are idle AND older than 2h (OPENCODE_REAP_STALE_MIN minutes, 0 disables). Busy sessions
    and long tasks are never touched; wrong identity is refused, never killed.

Fixed

  • Long-horizon safety — no more implicit kills: the delegate agent and delegation skill
    instructed "two consecutive timeouts → abort, treat as failed", which executed long-running
    tasks after ~20 minutes of chained waits. Timeouts are now supervision events only: keep
    re-issuing wait/waitAll indefinitely; abort fires exclusively on an explicit user request
    or a terminal non-retryable error. waitAll reports which sessions outlived its deadline with
    the same guidance; README documents the long-horizon contract and crash reattach flow.

Changed

  • Visibility without token burn: progress frames (the _meta.progressToken path Claude Code
    uses automatically) now stream every ~8s (was 15s) with the full one-line feed — reasoning ·
    current tool call · assistant tail. These frames render UI-side ONLY and never enter the model
    context, so watching a delegated subagent costs zero tokens/quota; the call keeps blocking up
    to 600s instead of slicing. The no-progressToken fallback auto-slice stays as before but its
    payload is slimmed (tail/reasoning 160 chars, 3 tool lines) to keep even that path cheap.
  • Automatic live feed from wait (classic-subagent feel): calls that pin neither
    timeoutSec nor a progressToken now auto-slice every 60s (OPENCODE_WAIT_SLICE_SEC
    override) instead of blocking mutely for up to 600s. Every slice returns a rich activity
    snapshot — assistant tail, reasoning tail, recent tool-call lines, todos — plus a nextStep
    to call again: the delegated agent's progress becomes visible by itself, no manual logs.
    Explicit timeoutSec / progressToken callers keep the old long-blocking behavior.

v1.16.0

Choose a tag to compare

@naicud naicud released this 25 Aug 13:08

Added

  • Five quality-of-life improvements:
    • Multilingual routing: the PreToolUse classifier now scores English AND Italian delegation
      intent (delegate, subagent(s), fan out, delega, subagente/i, in parallelo,
      rifattorizza…) up, and quick-look intent (cerca, veloce, esplora…) down.
    • Free-model auto-detection in sync: models:sync prints NEW free models detected: …;
      --auto-free promotes them straight to tier 0 (curated default never stolen).
    • Per-account budget caps: budget.accounts.<name>.maxDailyCostUsd is enforced at delegate
      time against that account's own daily spend (BUDGET_ACCOUNT_DAILY_MAX) on top of global
      caps; computeSpend buckets today's spend per account.
    • Race winner reasoning: fanOut mode:"race" now returns the winner's reasoningTail
      (last ~600 chars of chain-of-thought) for cross-model quality comparison.
    • Persistent activity buffer: the in-memory feed survives MCP server restarts via a
      throttled snapshot (state/activity-buffer.json, 300 lines × 100 jobs), reloaded lazily.
  • Live activity visibility — zero files by default: every delegated session's
    chain-of-thought reasoning, assistant output, tool-call state transitions
    (bash (running) {command…}, deduped per status), permission asks and lifecycle notes are
    captured in an in-memory per-job buffer inside the MCP server.
    • wait progress frames now stream a rich one-line feed (reasoning · latest tool · assistant
      tail) into Claude Code's console under the running call — like watching a classic subagent.
    • New mcp__plugin_opencode_oc__logs {jobId?|sessionID?|lines?} tool tails that buffer
      (latest delegate job by default) plus live assistantTail/reasoningTail for running
      sessions; wired into the opencode-delegate agent and delegate/parallel commands.
      Tool count is now twelve.
    • Opt-in disk mirror (OPENCODE_ACTIVITY_LOG=1) enables the terminal follower
      node plugins/opencode/scripts/oc-logs.mjs -f and the new /opencode:logs command.
  • Proactive routing skill (skills/opencode-routing/SKILL.md): trigger-rich description
    ("subagents, delegation, parallel workers, background tasks, fan-out") with an explicit
    anti-overuse guard — routine single-file edits, exploration and quick questions stay local.
    Delegation fires when the user asks for it, not on every task.

Changed

  • Docs: model catalog truth + "Adding models" guide. README gains a step-by-step section for
    adding models (live-catalog prerequisite, model add flags, verify loop, error table,
    free-only reality). Agent/skill tier guidance no longer advertises deepseek/kimi fallbacks —
    tiers 1-3 are empty under the current excluded list and a failed free run must be reported
    BLOCKED, not escalated to an excluded model.
  • Agent trigger phrases: opencode-delegate description now says "Use PROACTIVELY when the
    user asks for subagents, delegation, parallel workers, background tasks or fan-out work" plus
    explicit exclusions — this is the field Claude Code matches user wording against.
  • Part tracker captures reasoning parts alongside text; permission watcher exposes
    reasoningText() and an optional onEvent sink hook.
  • Catalog resync (2026-08-24): metadata refresh only — same 62 ids, contract/defaults/policies/
    excluded untouched. Live catalog currently offers NO free model beyond the seven already
    configured (big-pickle, hy3-free, mimo-v2.5-free, nemotron-3-ultra-free,
    nemotron-3.5-lightning-free, ox-alpha-free, x-preview-f-free); addModel→validate→resolve
    path re-verified for future additions (duplicate guard, tier-0 resolution).

Fixed

  • Router hook tier inconsistency: delegation advice no longer hardcodes tier:1 (a paid
    tier under the current free-only policy) — it instructs delegate {task, autoRetry:true}
    without tier/model so the resolver applies defaults.tier: 0.
  • Windows CI flake (windows-smoke): the smoke job could fail right after npm i -g
    with "opencode not found on PATH" — a runner PATH-refresh race. Fixes: npm global prefix is
    pinned to PATH via GITHUB_PATH, resolveOpencodeCommand() additionally probes the standard
    %APPDATA%\npm shim locations when where.exe misses, negative lookups are no longer cached
    (so retries heal), and the smoke script retries doctor's binary check 3× before failing.

v1.15.1

Choose a tag to compare

@naicud naicud released this 25 Aug 13:08

Fixed

  • Windows: opencode CLI resolution. npm installs the CLI as a .cmd shim on Windows, which Node cannot exec directly — ensureServer, doctor's binary check and version probing all failed with ENOENT on real Windows machines even with the CLI installed. New shared resolver (scripts/lib/opencode-bin.mjs) uses where.exe (prefers the real .exe), falls back to routing through cmd.exe /c; wired into server spawn, doctor and version probe.