OpenCode presents Cursor as an OpenAI-compatible provider. To bridge the gap between OpenCode's OpenAI-compatible chat requests and Cursor's specific process/stream protocol, a local proxy runs on 127.0.0.1:32124.
This proxy acts as a translation layer that converts Cursor's newline-delimited stream events into OpenAI-compatible responses (including assistant text, thinking, usage, errors, and tool calls).
OpenCode
│ OpenAI-compatible chat request
▼
local proxy on 127.0.0.1:32124
│
├─ cursor-agent, default
└─ Cursor SDK runner, optional fallback
│
▼
Cursor API
│ stream-json events
▼
provider boundary
├─ assistant text and thinking → SSE
└─ tool calls → OpenCode tool calls