tinyhumansai/openhuman · error · anyhow::Error

Missing 'url' for open action

Error message

Missing 'url' for open action

What it means

Guard in parse_browser_action for the `open` action: args has no string `url` field (missing or not a string). Parsing stops before any backend is contacted; all browser actions funnel through this parser from execute().

Source

Thrown at src/openhuman/tools/impl/browser/action_parser.rs:14

use super::types::{BrowserAction, ResolvedBackend};
use serde_json::Value;

/// Parse a JSON `args` object into a typed `BrowserAction`.
pub(crate) fn parse_browser_action(
    action_str: &str,
    args: &Value,
) -> anyhow::Result<BrowserAction> {
    match action_str {
        "open" => {
            let url = args
                .get("url")
                .and_then(|v| v.as_str())
                .ok_or_else(|| anyhow::anyhow!("Missing 'url' for open action"))?;
            Ok(BrowserAction::Open { url: url.into() })
        }
        "snapshot" => Ok(BrowserAction::Snapshot {
            interactive_only: args
                .get("interactive_only")
                .and_then(serde_json::Value::as_bool)
                .unwrap_or(true),
            compact: args
                .get("compact")
                .and_then(serde_json::Value::as_bool)
                .unwrap_or(true),
            depth: args
                .get("depth")
                .and_then(serde_json::Value::as_u64)
                .map(|d| u32::try_from(d).unwrap_or(u32::MAX)),
        }),
        "click" => {
            let selector = args

View on GitHub (pinned to 7491200858)

Solutions

  1. Include `url` as a string in the action args
  2. Use action="open" with {"url": "https://..."}
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/browser/action_parser.rs:14 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/6ba3588a2fb88641. Report an issue: GitHub.