Hmbown/CodeWhale · error
trajectory action must be start, stop, status or replay
Error message
trajectory action must be start, stop, status or replay (got ${JSON.stringify(args.action)}) What it means
Argument-validation guard in resolveTool for the 'trajectory' action: args.action matched none of start/stop/status/replay, so no trajectory wire command could be resolved. The offending action value is included in the message.
Solutions
- Check the action field sent on the trajectory call: only start, stop, status and replay are accepted; fix the typo or unsupported verb and resend.
- Log or print args.action at the call site to see the exact rejected value — the message embeds its JSON serialization for this reason.
- If you need a new trajectory verb, extend the switch in resolveTool with an explicit case that maps to a concrete tool name instead of relying on the fallback error.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/plugins/computer-use/src/tools.mjs:867 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/f6933c4f3481d738.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/plugins/computer-use/src/tools.mjs:867
case "type":
if (typeof rest.text !== "string" || !rest.text.length) throw bad('browser action "type" requires text');
return { name: "browser_type", args: rest };
case "screenshot": return { name: "browser_screenshot", args: rest };
case "stop": return { name: "browser_stop", args: rest };
default:
throw bad(`browser action must be start, status, navigate, click, type, screenshot or stop (got ${JSON.stringify(args.action)})`);
}
}
case "trajectory": {
const rest = { ...args };
delete rest.action;
switch (args.action) {
case "start": return { name: "trajectory_start", args: rest };
case "stop": return { name: "trajectory_stop", args: rest };
case "status": return { name: "trajectory_status", args: rest };
case "replay": return { name: "trajectory_replay", args: rest };
default:
throw bad(`trajectory action must be start, stop, status or replay (got ${JSON.stringify(args.action)})`);
}
}
default:
return { name, args };
}
}
View on GitHub (pinned to 73e0f67d83)