diff --git a/assistant/src/browser/operations.ts b/assistant/src/browser/operations.ts index bac21bb10cc..6e653603717 100644 --- a/assistant/src/browser/operations.ts +++ b/assistant/src/browser/operations.ts @@ -196,7 +196,8 @@ const DISPATCH_HANDLERS: Record = { * @param input - Flat input object matching the operation's field schema. * @param context - Tool execution context (conversation ID, signal, etc.). * @returns The tool execution result from the underlying handler. - * @throws If the operation identifier is not recognized. + * If the operation identifier is not recognized, returns an error + * result (`isError: true`) rather than throwing. */ export async function executeBrowserOperation( operation: BrowserOperation, @@ -220,8 +221,8 @@ export async function executeBrowserOperation( * constraints. Used by the CLI command builder to generate subcommands. * * The `browser_mode` and `activity` fields are omitted from per-operation - * metadata because they are common to all operations and handled by the - * CLI framework as global options. + * metadata because they are not exposed through the CLI. Operations + * invoked via the CLI always use the default browser mode. */ export const BROWSER_OPERATION_META: readonly BrowserOperationMeta[] = [ { diff --git a/assistant/src/cli/commands/browser.ts b/assistant/src/cli/commands/browser.ts index cda13760330..5f70da54f5e 100644 --- a/assistant/src/cli/commands/browser.ts +++ b/assistant/src/cli/commands/browser.ts @@ -154,6 +154,9 @@ function buildSubcommand(parent: Command, meta: BrowserOperationMeta): void { } } + // Browser operations can be long-running (page loads, auth + // challenges, downloads up to 120s, etc.), so use a generous + // IPC timeout that exceeds any server-side operation timeout. const ipcResult = await cliIpcCall( "browser_execute", { @@ -161,6 +164,7 @@ function buildSubcommand(parent: Command, meta: BrowserOperationMeta): void { input, sessionId, }, + { timeoutMs: 180_000 }, ); if (!ipcResult.ok) {