tinyhumansai/openhuman · error

Browser tool is enabled but no allowed_domains are configure

Error message

Browser tool is enabled but no allowed_domains are configured. Add [browser].allowed_domains in config.toml

What it means

validate_url fails when browser_open is enabled but no [browser].allowed_domains are configured. Unlike the automation tool there is no allow-all env escape; an empty allowlist makes every open out of policy, so the config gap is reported first.

Source

Thrown at src/openhuman/tools/impl/browser/browser_open.rs:37

    }

    fn validate_url(&self, raw_url: &str) -> anyhow::Result<String> {
        let url = raw_url.trim();

        if url.is_empty() {
            anyhow::bail!("URL cannot be empty");
        }

        if url.chars().any(char::is_whitespace) {
            anyhow::bail!("URL cannot contain whitespace");
        }

        if !url.starts_with("https://") {
            anyhow::bail!("Only https:// URLs are allowed");
        }

        if self.allowed_domains.is_empty() {
            anyhow::bail!(
                "Browser tool is enabled but no allowed_domains are configured. Add [browser].allowed_domains in config.toml"
            );
        }

        let host = extract_host(url)?;

        if is_private_or_local_host(&host) {
            anyhow::bail!("Blocked local/private host: {host}");
        }

        if !host_matches_allowlist(&host, &self.allowed_domains) {
            anyhow::bail!("Host '{host}' is not in browser.allowed_domains");
        }

        Ok(url.to_string())
    }
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Add [browser].allowed_domains entries in config.toml before using browser_open.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/browser/browser_open.rs:37 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/e1912726057fd5b4. Report an issue: GitHub.