Description
When using the AI tab in the code review UI with the OpenCode provider, Plannotator spawns a new opencode serve process instead of connecting to the already running OpenCode server.
Steps to reproduce
- Start OpenCode normally (it listens on port 4096)
- Open Plannotator code review (
plannotator review or /plannotator-review)
- Select OpenCode as the AI provider in the AI tab
- Send a message
Expected behavior
Plannotator should connect to the already running OpenCode server on port 4096 (or whatever port it's using).
Actual behavior
Plannotator spawns a new opencode serve --hostname=127.0.0.1 --port=4096, which crashes because the port is already in use:
Server exited with code 1 Server output: Warning: OPENCODE_SERVER_PASSWORD is not set; server is unsecured.
Error: Unexpected error, check log file at /Users/.../.local/share/opencode/log/2026-04-07T183619.log for more details
Failed to start server on port 4096
The log file contains only 3 lines — the process crashes during config loading before it can detect the port conflict gracefully.
If OpenCode is not running, Plannotator successfully spawns a new server, but this leads to issue #514.
Environment
- Plannotator: v0.17.1 (CLI), @plannotator/opencode@latest (plugin)
- OpenCode: v1.3.15
- OS: macOS (Apple Silicon)
- Bun: v1.3.11
Description
When using the AI tab in the code review UI with the OpenCode provider, Plannotator spawns a new
opencode serveprocess instead of connecting to the already running OpenCode server.Steps to reproduce
plannotator reviewor/plannotator-review)Expected behavior
Plannotator should connect to the already running OpenCode server on port 4096 (or whatever port it's using).
Actual behavior
Plannotator spawns a new
opencode serve --hostname=127.0.0.1 --port=4096, which crashes because the port is already in use:The log file contains only 3 lines — the process crashes during config loading before it can detect the port conflict gracefully.
If OpenCode is not running, Plannotator successfully spawns a new server, but this leads to issue #514.
Environment