tinyhumansai/openhuman · warning · anyhow::Error
Missing 'app' or 'auth_config_id' for connect
Error message
Missing 'app' or 'auth_config_id' for connect
What it means
Argument validation in the composio tool's 'connect' dispatch arm: after the security policy approves composio.connect, the call must carry at least one of args['app'] or args['auth_config_id'] — both define what to connect. With neither present the handler bails immediately; note the check treats null/non-string values the same as missing.
Source
Thrown at src/openhuman/integrations/composio/tools/direct.rs:880
Ok(ToolResult::success(output))
}
Err(e) => Ok(ToolResult::error(format!("Action execution failed: {e}"))),
}
}
"connect" => {
if let Err(error) = self
.security
.enforce_tool_operation(ToolOperation::Act, "composio.connect")
{
return Ok(ToolResult::error(error));
}
let app = args.get("app").and_then(|v| v.as_str());
let auth_config_id = args.get("auth_config_id").and_then(|v| v.as_str());
if app.is_none() && auth_config_id.is_none() {
anyhow::bail!("Missing 'app' or 'auth_config_id' for connect");
}
match self
.get_connection_url(app, auth_config_id, entity_id)
.await
{
Ok(url) => {
let target =
app.unwrap_or(auth_config_id.unwrap_or("provided auth config"));
Ok(ToolResult::success(format!(
"Open this URL to connect {target}:\n{url}"
)))
}
Err(e) => Ok(ToolResult::error(format!(
"Failed to get connection URL: {e}"
))),
}
}View on GitHub (pinned to 7491200858)
Solutions
- Pass a valid toolkit slug: {"action":"connect","app":"github"}
- Or pass a specific auth config: {"action":"connect","auth_config_id":"ac_..."}
- If the caller meant a different operation, use the supported action names (list, execute, connect) — connect always needs an app or auth_config_id
- For agents, include the requirement in the tool prompt so the model supplies 'app' on connect
Example fix
// before
let args = json!({ "action": "connect" });
// after
let args = json!({ "action": "connect", "app": "github" }); Defensive patterns
Strategy: validation
Validate before calling
let app = args.get("app").and_then(|v| v.as_str()).map(str::trim).filter(|s| !s.is_empty());
let cfg = args.get("auth_config_id").and_then(|v| v.as_str()).map(str::trim).filter(|s| !s.is_empty());
if app.is_none() && cfg.is_none() {
return Err(anyhow::anyhow!("connect requires a non-empty 'app' slug or 'auth_config_id'"));
} Type guard
fn has_connect_target(args: &serde_json::Value) -> bool {
let pick = |k: &str| args.get(k).and_then(|v| v.as_str()).map(str::trim).is_some_and(|s| !s.is_empty());
pick("app") || pick("auth_config_id")
} Try / catch
match tool.execute(json!({"action": "connect", ...args})).await {
Ok(result) => { /* contains the URL to open */ }
Err(e) if format!("{e:#}").contains("Missing 'app' or 'auth_config_id'") => {
// re-prompt the caller for the target instead of retrying with the same args
request_missing_param("app");
}
Err(e) => return Err(e),
} Prevention
- Always construct connect args with an explicit app slug or auth_config_id
- State the requirement in agent prompts/tool descriptions so models supply 'app' on connect
- Trim and type-check string args before dispatch — non-string values are silently treated as missing
When it happens
Trigger: Agent or user invokes the composio tool with action='connect' and an args object lacking both keys, e.g. {"action":"connect"} or {"action":"connect","app":42} (non-string app is ignored by as_str()).
Common situations: LLM omitting required connect parameters; a UI form submitted empty; args key named differently ('toolkit' instead of 'app').
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- composio.execute_tool: tool slug must not be empty
- composio.authorize: toolkit must not be empty
- composio.authorize: extra_params cannot override reserved ke
- composio.delete_connection: connectionId must not be empty
- composio.execute_tool: tool slug must not be empty
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/cc3e6ad475ee105f.
Report an issue: GitHub.