Skip to content

IDEA integration fails with V2 #54133

Closed as not planned
Closed as not planned

Description

@Tcharl

Description

Since the advent of opencode v2, Intellij Idea and other client are failing with these informations:
ACP process exited unexpectedly. Exit code: 1. Process output:
�[91m�[1mError: �[0mConfiguration is invalid at /Users/YYYY/.config/opencode/opencode.json
↳ V2 permissions are not supported by OpenCode V1. Use V1 "permission" rules or run opencode2. permissions

Please community, update the IJ plugin to use V2 ^^

Plugins

No response

OpenCode version

2.0.26

Steps to reproduce

Install OC v 2.0.26
Start intellij, update the 'opencode ai agent' in system preference
Try to chat

Screenshot and/or share link

No response

Operating System

No response

Terminal

intellij chat window

Activity

  1. opencode-agent commented on Oct 9, 2026

    @opencode-agent
    Contributor

    Thanks for the report, @Tcharl!

    The process IntelliJ starts is OpenCode v1 (opencode-ai), not the v2.0.26 you installed. v1 and v2 read the same ~/.config/opencode/opencode.json. v1 deliberately refuses a config that has a v2 permissions block (#45421), which is the error you're seeing. So the request is to have the IntelliJ/ACP-registry OpenCode agent launch v2. Maintainers will consider that.

    In the meantime, v2 has its own acp command, so you can point IntelliJ at it with a custom agent in acp.json (JetBrains ACP docs):

    {
      "agent_servers": {
        "OpenCode v2": {
          "command": "/absolute/path/to/opencode",
          "args": ["acp"]
        }
      }
    }

    Use the full path to the v2 opencode binary (which opencode will show it; opencode --version should print 2.x). Then select OpenCode v2 in the AI Chat agent selector instead of the built-in OpenCode agent.

    Related issues:

  2. hussain commented on Oct 11, 2026

    @hussain

    The ACP registry, which IntelliJ's agent list is built from, has an open PR adding OpenCode 2 as a separate opencode-v2 entry alongside the v1 opencode one: agentclientprotocol/registry#657. We tested it on Linux and Windows (report in the PR). It's waiting on review, and a word from an OpenCode maintainer there would likely help it land.

  3. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    Closing this. OpenCode itself isn't at fault here. IntelliJ starts its built-in OpenCode agent, which is OpenCode V1, and V1 deliberately refuses a shared opencode.json that contains V2 permissions. The error you saw comes from that check.

    You can switch now by adding a custom agent in IntelliJ's acp.json that runs your V2 binary with opencode acp, as described in the earlier comment. The change that adds OpenCode 2 to IntelliJ's agent list is tracked in the ACP registry at agentclientprotocol/registry#657.

  4. hussain commented on Oct 21, 2026

    @hussain

    For anyone landing here: OpenCode V2 is now in the ACP registry as opencode-v2 (agentclientprotocol/registry#657), so IntelliJ's agent list offers it directly, with no acp.json entry needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions