We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dcb8ed8 commit 96bde05Copy full SHA for 96bde05
1 file changed
packages/opencode/src/server/routes/instance/httpapi/handlers/pty.ts
@@ -153,6 +153,12 @@ export const ptyConnectRoute = HttpRouter.use((router) =>
153
return HttpServerResponse.empty()
154
}
155
156
+ // No `pending[]`-style early-frame buffer (the legacy Hono handler had one).
157
+ // `request.upgrade` returns a Socket without running the WS handshake; the
158
+ // handshake fires inside `socket.runRaw` below, AFTER `pty.connect` resolves
159
+ // and the message callback is registered. The client therefore can't fire
160
+ // `open` and start sending until the listener is already wired. Don't move
161
+ // `runRaw` ahead of `pty.connect` without re-introducing a buffer.
162
yield* socket
163
.runRaw((message) => handlePtyInput(handler, message))
164
.pipe(
0 commit comments