Description
In 2.0.3, opencode acp runs its own private opencode serve --stdio --port 0 child. If that child dies, the acp process keeps running and answers every later request with the same generic error:
{"code":-32603,"message":"Internal error: Internal service failure","data":{"errorName":"ClientError"}}
session/new, session/prompt, and session/list all fail this way until the client restarts opencode acp. The ACP process never exits, so a client that restarts the agent when its process exits never notices.
The error also can't be told apart from an ordinary request failure. On a healthy service, session/new with a cwd that does not exist returns exactly the same code, message, and data. That leaves clients two options: parse the message text, or send a second request to check whether the service is still alive.
Either of these would let clients recover cleanly:
- Exit
opencode acp (non-zero) when its private service exits, or restart the service in place.
- Return a distinct error for "the service is unreachable", for example a separate
data.errorName or data.service value.
Plugins
None
OpenCode version
2.0.3, driven over ACP (opencode acp) on stdio.
Steps to reproduce
- Start
opencode acp, then send initialize and session/new. Both succeed.
- Find the child with
pgrep -P <acp pid> (opencode serve --stdio --port 0) and kill -9 it.
- The
acp process stays alive. Send session/new, session/prompt, or session/list: each returns the error above.
- For comparison, on a fresh healthy process, send
session/new with cwd: "/does/not/exist". The response is the same error. A session/list sent right afterwards succeeds.
Screenshot and/or share link
N/A (JSON-RPC responses above)
Operating System
macOS 26 (Darwin 25.6.0), arm64
Terminal
N/A (ACP over stdio)
Description
In 2.0.3,
opencode acpruns its own privateopencode serve --stdio --port 0child. If that child dies, theacpprocess keeps running and answers every later request with the same generic error:{"code":-32603,"message":"Internal error: Internal service failure","data":{"errorName":"ClientError"}}session/new,session/prompt, andsession/listall fail this way until the client restartsopencode acp. The ACP process never exits, so a client that restarts the agent when its process exits never notices.The error also can't be told apart from an ordinary request failure. On a healthy service,
session/newwith acwdthat does not exist returns exactly the samecode,message, anddata. That leaves clients two options: parse the message text, or send a second request to check whether the service is still alive.Either of these would let clients recover cleanly:
opencode acp(non-zero) when its private service exits, or restart the service in place.data.errorNameordata.servicevalue.Plugins
None
OpenCode version
2.0.3, driven over ACP (
opencode acp) on stdio.Steps to reproduce
opencode acp, then sendinitializeandsession/new. Both succeed.pgrep -P <acp pid>(opencode serve --stdio --port 0) andkill -9it.acpprocess stays alive. Sendsession/new,session/prompt, orsession/list: each returns the error above.session/newwithcwd: "/does/not/exist". The response is the same error. Asession/listsent right afterwards succeeds.Screenshot and/or share link
N/A (JSON-RPC responses above)
Operating System
macOS 26 (Darwin 25.6.0), arm64
Terminal
N/A (ACP over stdio)