Skip to content

Commit 6fb4635

Browse files
fix(server): a timed-out preview call no longer evicts the shared server browser
Fixes #16921 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 0247145 commit 6fb4635

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/server/src/mcp/PreviewAutomationBroker.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,11 @@ export const make = Effect.gen(function* PreviewAutomationBrokerMake() {
662662
// The enclosing operation owns the span for this inline handler.
663663
onNone: Effect.fnUntraced(function* () {
664664
// Never replay possibly applied actions; slow metadata reads must not evict the host.
665-
if (input.updateCurrentTab !== false) {
665+
// The in-process server browser is shared by every thread and cannot hang its stream.
666+
if (
667+
input.updateCurrentTab !== false &&
668+
connection.clientId !== SERVER_BROWSER_AUTOMATION_CLIENT_ID
669+
) {
666670
yield* disconnect(connection.clientId, connection.queue, true);
667671
}
668672
return yield* new PreviewAutomationTimeoutError(requestContext);

0 commit comments

Comments
 (0)