@devries-cameron20 / t3code-1 / commits / 0981e6b9d4
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

perf(server): keep passive terminal output flowing (#17178)

Wout Stiens committed Oct 10, 2026 at 04:57 UTC 0981e6b9d421ec46010d9b9edebd0beb241ef472
2 files changed +3
apps/server/src/terminal/OutputProtocol.test.ts
+2
@@ -13,8 +13,10 @@ import { withTerminalOutputWindow } from "./OutputProtocol.ts";
13 describe("terminal output window", () => {
14 it.effect.each([
15 { tag: WS_METHODS.terminalAttach, size: 1, limit: 8 },
16 + { tag: WS_METHODS.terminalObserve, size: 1, limit: 8 },
17 { tag: WS_METHODS.subscribeTerminalEvents, size: 1, limit: 8 },
18 { tag: WS_METHODS.terminalAttach, size: 64 * 1024, limit: 1 },
19 + { tag: WS_METHODS.terminalObserve, size: 64 * 1024, limit: 1 },
20 { tag: WS_METHODS.subscribeTerminalMetadata, size: 1, limit: 1 },
21 ])("limits $tag with $size-byte values to $limit pending chunks", ({ tag, size, limit }) =>
22 Effect.gen(function* () {
apps/server/src/terminal/OutputProtocol.ts
+1
@@ -22,6 +22,7 @@ export function withTerminalOutputWindow(
22 if (
23 message._tag === "Request" &&
24 (message.tag === WS_METHODS.terminalAttach ||
25 + message.tag === WS_METHODS.terminalObserve ||
26 message.tag === WS_METHODS.subscribeTerminalEvents)
27 ) {
28 const key = `${clientId}:${message.id}`;