tinyhumansai/openhuman · error · anyhow::Error

browser args must be a JSON object

Error message

browser args must be a JSON object

What it means

Guard in execute_computer_use_action: the browser tool args are not a JSON object, so params cannot be extracted for the computer-use call. Caused by the model emitting an array/string/primitive instead of an object mapping action parameters.

Source

Thrown at src/openhuman/tools/impl/browser/browser.rs:623

                self.validate_coordinate("from_y", from_y, self.computer_use.max_coordinate_y)?;
                self.validate_coordinate("to_y", to_y, self.computer_use.max_coordinate_y)?;
            }
            _ => {}
        }
        Ok(())
    }

    async fn execute_computer_use_action(
        &self,
        action: &str,
        args: &Value,
    ) -> anyhow::Result<ToolResult> {
        let endpoint = self.computer_use_endpoint_url()?;

        let mut params = args
            .as_object()
            .cloned()
            .ok_or_else(|| anyhow::anyhow!("browser args must be a JSON object"))?;
        params.remove("action");

        self.validate_computer_use_action(action, &params)?;

        let payload = json!({
            "action": action,
            "params": params,
            "policy": {
                "allowed_domains": self.allowed_domains,
                "window_allowlist": self.computer_use.window_allowlist,
                "max_coordinate_x": self.computer_use.max_coordinate_x,
                "max_coordinate_y": self.computer_use.max_coordinate_y,
            },
            "metadata": {
                "session_name": self.session_name,
                "source": "openhuman.browser",
                "version": env!("CARGO_PKG_VERSION"),
            }

View on GitHub (pinned to 7491200858)

Solutions

  1. Send the tool arguments as a JSON object
  2. Wrap action parameters in an object, e.g. {"action":"open","url":"..."}
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/browser/browser.rs:623 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/ac4bc4d6bf97f4f0. Report an issue: GitHub.