diff --git a/browse/src/server.ts b/browse/src/server.ts index c417b831..30cbe642 100644 --- a/browse/src/server.ts +++ b/browse/src/server.ts @@ -558,7 +558,7 @@ function spawnClaude(userMessage: string, extensionUrl?: string | null, forTabId // the system prompt — session is killed, user sees the banner. const canary = generateCanary(); - const baseSystemPrompt = [ + const systemPrompt = [ '', `Browser co-pilot. Binary: ${B}`, 'Run `' + B + ' url` first to check the actual page. NEVER assume the URL.', @@ -585,9 +585,9 @@ function spawnClaude(userMessage: string, extensionUrl?: string | null, forTabId // Append the canary instruction. injectCanary() tells Claude never to // output the token on any channel. - const systemPrompt = injectCanary(baseSystemPrompt, canary); + const systemPromptWithCanary = injectCanary(systemPrompt, canary); - const prompt = `${systemPrompt}\n\n\n${escapedMessage}\n`; + const prompt = `${systemPromptWithCanary}\n\n\n${escapedMessage}\n`; // Never resume — each message is a fresh context. Resuming carries stale // page URLs and old navigation state that makes the agent fight the user.