Skip to content

session/new returns "Internal error" on Windows via ACP #17285

Closed

Description

@zhaixccc

Description

Description

When using acpx (ACP client) to connect to opencode via ACP protocol on Windows, the session/new method returns "Internal error".

Environment

  • OS: Windows 11
  • opencode version: 1.2.25
  • acpx version: 0.3.0
  • Node.js: v22.17.0

Steps to Reproduce

  1. Install opencode: npm install -g opencode-ai
  2. Install acpx: npm install -g acpx
  3. Run: acpx --format json opencode exec "test"

Expected Behavior

session/new should succeed and return a session ID.

Actual Behavior

The initialize succeeds, but session/new fails with "Internal error".

Additional Context

  • Authentication is configured (zhipuai and lenovo providers)
  • opencode works normally in interactive mode
  • The issue only occurs with ACP mode (opencode acp)

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 13, 2026
  2. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  3. kesor commented on Mar 14, 2026

    @kesor

    Have this issue as well, when using acpx --format json opencode exec "text" seeing these errors in ~/.local/share/opencode/logs/*.log

    INFO  2026-03-14T12:12:52 +3ms service=config path=/var/lib/openclaw/.config/opencode/config.json loading
    INFO  2026-03-14T12:12:52 +0ms service=config path=/var/lib/openclaw/.config/opencode/opencode.json loading
    INFO  2026-03-14T12:12:52 +7ms service=config path=/var/lib/openclaw/.config/opencode/opencode.jsonc loading
    ERROR 2026-03-14T12:12:52 +152ms service=server error= failed
    ERROR 2026-03-14T12:12:52 +4ms service=server error= failed
    ERROR 2026-03-14T12:12:52 +1ms service=acp-agent error=Unauthorized failed to load user config for default model
    ERROR 2026-03-14T12:12:52 +0ms service=server error= failed
    ERROR 2026-03-14T12:12:52 +0ms service=acp-agent error=Unauthorized failed to list providers for default model
    ERROR 2026-03-14T12:12:52 +1ms service=server error= failed
    

    Even though the ~/.config/opencode/opencode.json file is configured with a provider and model, and a default model, and just using opencode on the cli works and uses the configured model.

    For me the problem was having OPENCODE_SERVER_PASSWORD in the environment. Was causing this problem, and removing it resolved it.

  4. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions