tinyhumansai/openhuman · error · anyhow::Error

Proxy is disabled. Use action 'set' with enabled=true first

Error message

Proxy is disabled. Use action 'set' with enabled=true first

What it means

handle_apply_env loaded the persisted proxy configuration and found enabled=false, so there is nothing to export into the process environment; the user is directed to enable the proxy before applying it.

Source

Thrown at src/openhuman/tools/impl/system/proxy_config.rs:279

            .unwrap_or(clear_env_default);
        if clear_env {
            ProxyConfig::clear_process_env();
        }

        Ok(ToolResult::success(serde_json::to_string_pretty(&json!({
            "message": "Proxy disabled",
            "proxy": Self::proxy_json(&cfg.proxy),
            "environment": Self::env_snapshot(),
        }))?))
    }

    fn handle_apply_env(&self) -> anyhow::Result<ToolResult> {
        let cfg = self.load_config_without_env()?;
        let proxy = cfg.proxy;
        proxy.validate()?;

        if !proxy.enabled {
            anyhow::bail!("Proxy is disabled. Use action 'set' with enabled=true first");
        }

        if proxy.scope != ProxyScope::Environment {
            anyhow::bail!(
                "apply_env only works when proxy.scope is 'environment' (current: {:?})",
                proxy.scope
            );
        }

        proxy.apply_to_process_env();
        set_runtime_proxy_config(proxy.clone());

        Ok(ToolResult::success(serde_json::to_string_pretty(&json!({
            "message": "Proxy environment variables applied",
            "proxy": Self::proxy_json(&proxy),
            "environment": Self::env_snapshot(),
        }))?))
    }

View on GitHub (pinned to 7491200858)

Solutions

  1. Run action 'set' with enabled=true to enable the proxy first
  2. Then re-run action 'apply_env'
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/system/proxy_config.rs:279 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/08d7fd08821b9508. Report an issue: GitHub.