Skip to content

Releases

v0.11.2

Choose a tag to compare

@aorizondo aorizondo released this 03 Nov 04:47

Fixed

  • "continue" after a stopped turn no longer fails. When a turn was stopped mid tool loop,
    claude-agent-acp 0.31 failed the next prompt at once with the CLI's diagnostic for the
    interrupted cycle ([ede_diagnostic] result_type=user last_content_type=n/a stop_reason=tool_use); OpenCode retried into the same error and the session looked dead.
    The prompt is now re-sent once on a re-opened session, on the same stream.

Added

  • Warning when OpenCode drops a second copy of the plugin. Configured with different
    specs in two configs (e.g. a remote/organization config pinning another version), OpenCode
    runs the first layer's copy and silently ignores the other. The running copy now logs
    which spec runs and which was ignored.

Changed

  • Dependencies updated within their current majors (@mcpc-tech/acp-ai-provider 0.3.9;
    dev: @opencode/plugin 2.2.5, TypeScript 5.9). ai and @ai-sdk/provider stay on 6 / 3,
    the majors OpenCode V2 serves to plugins.

v0.11.0

Choose a tag to compare

@aorizondo aorizondo released this 26 Oct 07:33

Changed — breaking

  • One agent per Claude Code mode. The plugin injects a claude-<mode> agent for every
    session mode the agent reports: claude-default, claude-plan, claude-acceptedits,
    claude-auto, claude-dontask, claude-bypasspermissions (the six known modes when
    discovery has none). They replace claude-code and claude-code-plan, with no aliases:
    rename those agents in your agents section (claude-code → claude-default,
    claude-code-plan → claude-plan). The mode only governs Claude's native tools; OpenCode's
    tools keep the agent's OpenCode permissions. Effort stays a model variant; claude-plan
    keeps high.

  • The acp models are paired with the Claude Code agents (pairModels, default true).
    OpenCode V2 offers every model to every agent, so the plugin enforces it:

    • selecting an agent or model that breaks the pair moves the session back to a valid model
      (the agent's own, the session's last non-acp model, or OpenCode's default model);
    • an acp request from any other agent fails at once (HTTP 400, x-should-retry: false);
    • OpenCode subagents launched from a claude-* agent get their own model or the default one
      instead of inheriting acp.

    Agents you declare with an acp/… model count as Claude Code agents. pairModels: false
    restores the old behaviour.

  • The usage-limit error now says to switch agent rather than model.

Fixed

  • Each effort variant started its own agent process. OpenCode V2 builds a new SDK instance
    for every distinct model settings, and the effort variants are settings, so #high,
    #low and the plain model each spawned a claude-agent-acp that resumed the same Claude
    session apart from the others (cache partly cold; going back to a variant found a process
    that had missed the turns in between). Provider instances built from the same agent config
    now share one orchestrator: effort switches live with setSessionConfigOption, and the
    model without a variant restores the session's own effort.

🤖 Generated with Claude Code

https://claude.ai/code/session_019Bhv29V2sJa1Jotm7UQ9Vt

v0.10.1

Choose a tag to compare

@aorizondo aorizondo released this 24 Oct 01:52

Fixed

  • The usage-limit error was retried by OpenCode ≥ 2.1. OpenCode 2.1 no longer decides
    retries by the wording of the error message: any error it cannot classify is retried,
    about 10 attempts over ~84 s, before the user can switch models. The error is now an
    APICallError with HTTP 402 and x-should-retry: false. OpenCode classifies that as
    QuotaExceeded and fails at once.

Changed

  • Documentation translated to English and rewritten for newcomers; OpenCode V2 only stated
    explicitly.
  • Runtime messages (usage-limit error, session notes, mode-change notice) translated to English.
  • @opencode/plugin peer range narrowed to ^2.0.14 (excludes a future 3.x).

Added

  • MIT LICENSE file.
  • Load-time compatibility warnings: OpenCode major version, and claude-agent-acp older than
    the tested 0.31.
  • prepublishOnly install check (scripts/check-install.mjs).

v0.8.0 — continuidad de sesión, coste de tokens y tooling

Choose a tag to compare

@aorizondo aorizondo released this 22 Aug 03:44

Versión centrada en el coste de tokens y en la continuidad de sesión. La causa común de casi todos los problemas era la misma: el provider recreaba la sesión ACP con demasiada facilidad, y cada recreación implica replay del historial completo y cache de prompt frío.

⚠️ Breaking

  • claudeCode.configDir hereda ~/.claude por defecto (antes "isolated"). Las sesiones iniciadas en OpenCode se retoman con claude --resume <id> (el provider imprime el id). No reintroduce tu ecosistema: settingSources/tools/strictMcpConfig siguen mandando. Vuelve al comportamiento anterior con "configDir": "isolated".
  • El límite de contexto deja de inflarse a 1M para el modelo default; anunciar 1M impedía que la auto-compactación de OpenCode se disparase nunca.

Fixed

  • Gasto de tokens desproporcionado (causa principal). Cada turno reenviaba como texto plano todos los tool-call/tool-result del turno anterior — volcados íntegros de ficheros y salidas de shell — que el agente ya tenía, invalidando además el prompt cache.
  • Cambiar de agente destruía la sesión y replayaba todo. systemKey hasheaba el system prompt de OpenCode incluso con preset, modo en el que ese system nunca se envía al agente. Ahora claude-code-plan → build → claude-code mantiene la misma sesión ACP.
  • Un cambio en el set de tools ya no recrea la sesión (se aplica en caliente vía notifications/tools/list_changed), y la llamada del modelo de títulos (tools=0) va a una sesión efímera aparte.
  • Texto truncado y razonamiento invisible (misma causa). Texto y thinking llegan por stdio ACP y las tool-calls por el socket del McpHost, sin orden garantizado; al cerrar el stream se descartaba en silencio lo que seguía llegando. Ahora se bufferiza y se vuelca en la continuación.
  • Revertir mensajes dejaba las dos partes desincronizadas y reenviaba el historial entero. Ahora se compara una huella del historial y se distingue append / revert / divergencia por compactación.
  • Dos conversaciones simultáneas se destruían la sesión mutuamente (había un único TurnState por instancia de modelo). Ahora hay una sesión por conversación, con cota LRU.
  • claude-code-plan no tenía forma de salir de modo plan: ExitPlanMode no estaba expuesta. Aprobar un plan además concedía bypassPermissions; ahora se prefiere default.
  • El agente no usaba la tool question ni tenía búsqueda web; ambos corregidos.
  • Resultados de tools con estructura (imágenes/adjuntos), aviso cuando un effort es rechazado, y cancelar un turno ya no tira la sesión.

Changed

  • claude-code y claude-code-plan comparten el mismo perfil de tools y permisos, difiriendo solo en el modo inicial: salir de plan ya no deja al agente a medias.
  • Nueva opción claudeCode.forwardEnvContext (default true): reenvía la parte factual del system prompt de OpenCode (<env>, <available_references>) como contexto de usuario. Verificado que mantiene la facturación por suscripción.

Changelog completo: CHANGELOG.md