diff --git a/tests/e2e/helpers/golden-stub-agent.ts b/tests/e2e/helpers/golden-stub-agent.ts index f20573e4b64..427a6a2560c 100644 --- a/tests/e2e/helpers/golden-stub-agent.ts +++ b/tests/e2e/helpers/golden-stub-agent.ts @@ -33,7 +33,7 @@ export async function configureGoldenStubAgent( ): Promise { const agent = options.agent ?? 'codex' await page.evaluate( - async ({ agent, windowsShell }) => { + async ({ agent, agentArgs, windowsShell }) => { const store = window.__store if (!store) { throw new Error('Orca store is unavailable') @@ -41,7 +41,7 @@ export async function configureGoldenStubAgent( await store.getState().updateSettings({ defaultTuiAgent: agent, agentCmdOverrides: { [agent]: 'golden-stub-agent' }, - agentDefaultArgs: { [agent]: options.agentArgs ?? '' }, + agentDefaultArgs: { [agent]: agentArgs }, ...(windowsShell ? { terminalWindowsShell: windowsShell } : {}) }) },