The best way to control Claude Code, Codex and more from any computer or phone
fix(desktop): sign-in and captchas work again in desktop browser tabs (#16939)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Julius Marminge committed
Oct 7, 2026 at 13:39 UTC
538329603352173afe3ae9f4586a4f772c0f3a4f
2 files changed
+29
-2
apps/desktop/src/preview/CdpRelay.test.ts
+22
@@ -75,6 +75,28 @@ describe("CDP relay", () => {
75
});
76
});
77
78
+ it("resumes paused child frames, so cross-site iframes run", async () => {
79
+ const send = vi.fn(async () => ({}));
80
+ const relay = createCdpRelayConnection(makeTarget(send), () => {});
81
+ // The page's own session is already running; only its children wait.
82
+ relay.receive(
83
+ JSON.stringify({
84
+ id: 1,
85
+ method: "Runtime.runIfWaitingForDebugger",
86
+ sessionId: "t3-preview-page",
87
+ }),
88
+ );
89
+ relay.receive(
90
+ JSON.stringify({
91
+ id: 2,
92
+ method: "Runtime.runIfWaitingForDebugger",
93
+ sessionId: "iframe-session",
94
+ }),
95
+ );
96
+ await settle();
97
+ expect(send.mock.calls).toEqual([["Runtime.runIfWaitingForDebugger", {}, "iframe-session"]]);
98
+ });
99
+
100
it("routes tab events to the page session once the page is announced", async () => {
101
const written: Array<Record<string, unknown>> = [];
102
const relay = createCdpRelayConnection(makeTarget(vi.fn()), (raw) =>
apps/desktop/src/preview/CdpRelay.ts
+7
-2
@@ -158,9 +158,14 @@ export function createCdpRelayConnection(
158
};
159
160
const pageCommand = (command: CdpCommand): Promise<unknown> => {
161
- // The page is already running; nothing waits for a debugger.
162
- if (command.method === "Runtime.runIfWaitingForDebugger") return Promise.resolve({});
161
const child = sessions.get(command.sessionId!) === "page" ? undefined : command.sessionId;
162
+ // The page itself is already running, but its child frames are not:
163
+ // Playwright auto-attaches with waitForDebuggerOnStart, so Chromium pauses
164
+ // every new cross-site iframe and worker until this reaches it. Swallowing
165
+ // it left sign-in checks and captchas, which run in such frames, frozen.
166
+ if (command.method === "Runtime.runIfWaitingForDebugger" && child === undefined) {
167
+ return Promise.resolve({});
168
+ }
169
return target.send(command.method, command.params ?? {}, child);
170
};
171