Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

Merge branch 'webbrain-one:main' into main

Emre Sokullucec239e39dc8
diff --cc src/chrome/src/agent/agent.js
index 57250d4bd,55b4575d5..01b3939f9
--- a/src/chrome/src/agent/agent.js
+++ b/src/chrome/src/agent/agent.js
@@@ -38226,11 -38261,9 +38261,12 @@@ If the user has already named or confir
// the configurable auto-timeout elapses (first option / timeout note).
// Permission and form-submit prompts use separate helpers and never time out.
if (name === 'clarify') {
+ args = await this._socialDraftClarificationArgs(tabId, args);
const clarificationGuard = this._planExecutionGuards.get(tabId);
- const question = String(args?.question || '').trim();
+ // Models sometimes copy a JSON-escaped post body into clarify text,
+ // leaving literal `\"` after the tool-call JSON is parsed. The card
+ // renders via textContent, so repair before display/storage.
+ const question = repairClarifyText(String(args?.question || '').trim()).slice(0, 600);
if (!question) {
return { success: false, error: 'clarify: `question` is required (a single sentence asking the user something specific).' };
}
diff --cc src/firefox/src/agent/agent.js
index f9db98320,88a2bfc5c..443379805
--- a/src/firefox/src/agent/agent.js
+++ b/src/firefox/src/agent/agent.js
@@@ -34763,11 -34797,9 +34797,12 @@@ Rules: no prose intro, no conclusion, n
// / timeout note). Permission and form-submit prompts use separate
// helpers and never time out.
if (name === 'clarify') {
+ args = await this._socialDraftClarificationArgs(tabId, args);
const clarificationGuard = this._planExecutionGuards.get(tabId);
- const question = String(args?.question || '').trim();
+ // Models sometimes copy a JSON-escaped post body into clarify text,
+ // leaving literal `\"` after the tool-call JSON is parsed. The card
+ // renders via textContent, so repair before display/storage.
+ const question = repairClarifyText(String(args?.question || '').trim()).slice(0, 600);
if (!question) {
return { success: false, error: 'clarify: `question` is required (a single sentence asking the user something specific).' };
}