vercel-labs/agent-browser · error
The "${action}" action requires a value.
Error message
The "${action}" action requires a value. What it means
The eve 'find' tool accepts an action applied to the matched element; the 'fill' action types text, so it requires the optional 'value' field. execute() throws before shelling out to the CLI when action is 'fill' and value is undefined — a cheap input-validation guard so the CLI never receives an incomplete command.
Source
Thrown at packages/@agent-browser/eve/extension/tools/find.ts:29
by: z.enum(["role", "text", "label", "placeholder", "alt", "title", "testid", "first", "last"]),
exact: z
.boolean()
.default(false)
.describe(
'Exact, case-sensitive match. For "role" it applies to the accessible name, whose default is a case-insensitive substring.',
),
name: z
.string()
.optional()
.describe('Accessible name filter when by is "role", e.g. role "button" named "Submit".'),
query: z
.string()
.describe('What to match: the role name, text, label, etc. For "first"/"last", a CSS selector.'),
value: z.string().optional().describe('Text to enter for the "fill" action.'),
}),
async execute({ action, by, exact, name, query, value }, ctx) {
if (action === "fill" && value === undefined) {
throw new Error(`The "${action}" action requires a value.`);
}
const args = ["find", by, query, action];
if (value !== undefined) args.push(value);
if (name !== undefined) args.push("--name", name);
if (exact) args.push("--exact");
return await runBrowser(ctx, args);
},
});
View on GitHub (pinned to 548b159b30)
Solutions
- Pass value: tools.find({ action: 'fill', by: 'role', query: 'textbox', value: 'hello@example.com' })
- Default it in your caller when the text may be empty: value: text ?? ''
- Validate required action/value pairs before invoking the tool
Example fix
// before
await tools.find({ action: "fill", by: "role", query: "textbox", name: "Email" });
// after
await tools.find({ action: "fill", by: "role", query: "textbox", name: "Email", value: "user@example.com" }); Defensive patterns
Strategy: validation
Validate before calling
if (input.action === "fill" && (input.value === undefined || input.value === null)) {
throw new Error("fill requires the text to type; refusing to call the tool.");
}
await tools.find(input); Type guard
function isValidFindInput(i: { action: string; value?: string }): boolean {
return !(i.action === "fill" && i.value === undefined);
} Prevention
- Treat value as required whenever action is fill in your prompting or wrapper types
- Default empty strings explicitly (value: text ?? "") when the intent is to clear a field
- Validate action/value pairs upstream so the tool never sees the bad combination
When it happens
Trigger: Invoking the find tool with { action: 'fill', by: 'role', query: 'textbox', ... } but omitting value; models leaving optional fields absent because the schema marks value optional.
Common situations: LLM agents omitting optional parameters; refactors that drop the value field; form-filling flows where the text lives in a separate variable that is undefined.
Related errors
- The "${property}" property requires a selector.
- The "attr" property requires an attribute name.
- The "goto" action requires a url.
- Provide a direction to scroll, or a selector to scroll into
- The "switch" action requires a target tab id or label.
AI-assisted analysis of vercel-labs/agent-browser@548b159b30 (2026-08-16).
Data as JSON: /api/errors/f5e78259e7022612.
Report an issue: GitHub.