diff --git a/launcher/electron/runtime.cjs b/launcher/electron/runtime.cjs index 854b5eba1..4c5d19706 100644 --- a/launcher/electron/runtime.cjs +++ b/launcher/electron/runtime.cjs @@ -697,6 +697,7 @@ class RuntimeHost { mode === "full" ? "--full" : "--browser-only", "--browser-host-descriptor", this.browserDescriptorPath, + "--replace-codex-route", "--acknowledge-unofficial", "--restart-service", ]; diff --git a/launcher/tests/runtime-host.test.cjs b/launcher/tests/runtime-host.test.cjs index e17625e40..c17772b3e 100644 --- a/launcher/tests/runtime-host.test.cjs +++ b/launcher/tests/runtime-host.test.cjs @@ -31,14 +31,30 @@ test("core setup preserves an existing full-harness installation", async () => { const fixture = hostFor({ mode: "full" }); const result = await fixture.host.setupCore(); assert.equal(result.mode, "full"); - assert.deepEqual(fixture.invocation().args.slice(0, 2), ["setup", "--full"]); + assert.deepEqual(fixture.invocation().args, [ + "setup", + "--full", + "--browser-host-descriptor", + "/runtime/launcher-browser.json", + "--replace-codex-route", + "--acknowledge-unofficial", + "--restart-service", + ]); }); test("core setup starts in browser-only mode when no installation exists", async () => { const fixture = hostFor(null); const result = await fixture.host.setupCore(); assert.equal(result.mode, "browser-only"); - assert.deepEqual(fixture.invocation().args.slice(0, 2), ["setup", "--browser-only"]); + assert.deepEqual(fixture.invocation().args, [ + "setup", + "--browser-only", + "--browser-host-descriptor", + "/runtime/launcher-browser.json", + "--replace-codex-route", + "--acknowledge-unofficial", + "--restart-service", + ]); }); test("launcher update transaction upgrades its owned full runtime with saved configuration", async () => {