Skip to content

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

List clarify among the Chrome compact prompt's tools

Claudede00e5bc9a4c
diff --git a/src/chrome/src/agent/tools.js b/src/chrome/src/agent/tools.js
index 0f509242d..746b24a6e 100644
--- a/src/chrome/src/agent/tools.js
+++ b/src/chrome/src/agent/tools.js
@@ -2568,6 +2568,7 @@ ${BROWSER_TAB_LIMITATION}
- upload_file({attachmentId, targetId?}): Two steps: first call with the current attachmentId only to discover file inputs; then call again with the same attachmentId and one returned targetId. Never guess a targetId. If discovery finds no input because the widget creates it lazily, make one guarded initializer click and repeat discovery. A page_consumed attachment may clear its file input and show a preview/crop instead of a filename. Inspect the staged preview/crop or status and the current task-authorized Save/Submit/Commit controls; local attachment does not prove a remote upload or remote submission. Do not re-open the chooser or re-upload solely because the filename is absent or not rendered. Retry only if the file is genuinely missing or the user explicitly requests a new file.
- scratchpad_write({text}): Save notes that persist across steps.
- progress_update({items}) / progress_read({status}): Structured progress ledger for the active repeated item/action task. On GitHub stargazers, only "Follow USER" buttons are follow targets when following is allowed by the task; "Unfollow USER" means skip/already followed unless the ledger shows acted.
+- clarify({question, consequence, options?, finish_option?, safe_first?}): Ask the user only when materially blocked or ambiguous. Set consequence on every question ("none", or the approval it asks for). On timeout the user\'s setting picks finish_option (default) or the safe options[0] for consequence "none"; safe_first makes that selection apply; any other question takes options[0] and approves nothing; source=auto Instant is intentional auto-approve.
- done({summary, outcome}): Signal success, partial progress, or a failed blocker.
PATTERN:
diff --git a/test/prompt-missing-values.mjs b/test/prompt-missing-values.mjs
index 5046b1d00..aa1a214b5 100644
--- a/test/prompt-missing-values.mjs
+++ b/test/prompt-missing-values.mjs
@@ -22,5 +22,6 @@ for (const build of ['chrome', 'firefox']) {
assert.doesNotMatch(prompt.match(/Type only values[^\n]*/)[0], /done\(/);
const names = tools.getToolsForMode('act', { tier: 'compact' }).map(tool => tool.function.name);
assert.ok(names.includes('clarify'), 'compact exposes clarify');
+ assert.match(prompt, /^- clarify\(\{question[^\n]*\n- done\(/m, 'the compact tool list names clarify (it says use ONLY these)');
});
}