When an ACP request sequence finishes, rpc::drive aborts its reader and writer tasks, which drops the adapter's stdin and stdout. claude-agent-acp writes to stdout again after that, gets EPIPE, and dies with an unhandled 'error' event and exit status 1 (stack at claude-agent-acp/dist/utils.js:46).
process::run ignores the adapter's exit status once the foreground sequence has returned Ok, so the crash no longer turns a finished response into an error. That was the cause of the missing conversation titles. But every ACP request still ends with the adapter crashing, and a real failure during shutdown is indistinguishable from this one.
Shut the connection down in order instead:
Kill the process group only if it has not exited by then
Test with a fixture adapter that writes once more after stdin closes: it exits on its own, not from SIGPIPE