From 014de0ec21936a7a2fd64db9d151e73c79bb44ad Mon Sep 17 00:00:00 2001
From: Patrick Barattin
Date: Sun, 11 Oct 2026 20:25:38 +0200
Subject: refactor: remove duplicate browser prompt instructions (#35)
Remove browser instruction text repeated across tool descriptions, parameter schemas, tool
guidelines and the global browser prompt. Tool names, schemas, handlers and concurrency are
unchanged; shared recovery and ownership guidance is now available before and after the browser
connects, and the prompt names which tools are serialized versus observations.
Co-Authored-By: Claude Fable 5.1
---
src/index.ts | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
(limited to 'src/index.ts')
diff --git a/src/index.ts b/src/index.ts
index d69940a..a2e0c11 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -150,13 +150,8 @@ export default function browserHarnessExtension(pi: ExtensionAPI): void {
});
pi.on("before_agent_start", async (event) => {
- if (!client || !client.status().alive) {
- return {
- systemPrompt:
- event.systemPrompt +
- `\n\n## Browser Control\n\nBrowser tools (browser_*) are available but the browser is not connected. Run /browser-setup.`,
- };
- }
- return { systemPrompt: event.systemPrompt + getBrowserSystemPrompt() };
+ return {
+ systemPrompt: event.systemPrompt + getBrowserSystemPrompt(client?.status().alive ?? false),
+ };
});
}
--
cgit v1.2.3