mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
The OpenCode adapter sent the prompt before its SSE event subscription was active. Since /event does not replay, terminal session.error/idle events for invalid mode or unsupported model could land before the subscription, leaving the agent stuck in running forever. Await subscription readiness before promptAsync, and surface synchronous or rejected prompt errors as turn_failed. Also force-drop sockets in daemon shutdown so test harnesses don't hang on lingering WS upgrades. Adds a real-opencode e2e regression test for the invalid-mode case and a unit test for the synchronous-throw path.