From 68ec055d403749e557d73bebb6bedaa58e10fafb Mon Sep 17 00:00:00 2001 From: Developers Digest <124798203+developersdigest@users.noreply.github.com> Date: Tue, 17 Feb 2026 13:29:11 -0500 Subject: [PATCH 1/2] Update browser.ts --- src/commands/browser.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/commands/browser.ts b/src/commands/browser.ts index 4cbb76c439..14d7414410 100644 --- a/src/commands/browser.ts +++ b/src/commands/browser.ts @@ -113,24 +113,14 @@ export async function handleBrowserLaunch( /** * Execute a bash command locally with CDP_URL and SESSION_ID env vars. - * Auto-injects --cdp for agent-browser commands. + * agent-browser reads CDP_URL from the environment automatically. */ export function executeBashLocally( command: string, session: { id: string; cdpUrl: string } ): Promise<{ stdout: string; stderr: string; exitCode: number }> { return new Promise((resolve) => { - // Auto-inject --cdp for agent-browser commands - let finalCommand = command; - if (command.startsWith('agent-browser') && !command.includes('--cdp')) { - const parts = command.split(' '); - // Insert --cdp after "agent-browser " - const insertIdx = Math.min(2, parts.length); - parts.splice(insertIdx, 0, '--cdp', `'${session.cdpUrl}'`); - finalCommand = parts.join(' '); - } - - const child = spawn('sh', ['-c', finalCommand], { + const child = spawn('sh', ['-c', command], { env: { ...process.env, CDP_URL: session.cdpUrl, From c1e0f007a206f7ee145759355f081e25faae1b89 Mon Sep 17 00:00:00 2001 From: Developers Digest <124798203+developersdigest@users.noreply.github.com> Date: Tue, 17 Feb 2026 13:31:39 -0500 Subject: [PATCH 2/2] update package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 62700653be..415f702ceb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firecrawl-cli", - "version": "1.4.0", + "version": "1.4.1", "description": "Command-line interface for Firecrawl. Scrape, crawl, and extract data from any website directly from your terminal.", "main": "dist/index.js", "bin": {