{"record":{"id":"ec4d3bcd7f1a2c90","repo":"zeroclaw-labs/zeroclaw","slug":"composio-v3-nlp-execute-failed-on-candidates-v3","errorCode":null,"errorMessage":"Composio v3 NLP execute failed on candidates ({v3_error_summary}){prime_suffix}{}","messagePattern":"Composio v3 NLP execute failed on candidates \\((.+?)\\)(.+?)(.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/composio.rs","lineNumber":263,"sourceCode":"            {\n                Ok(result) => return Ok(result),\n                Err(err) => v3_errors.push(format!(\"{slug}: {err}\")),\n            }\n        }\n\n        let v3_error_summary = if v3_errors.is_empty() {\n            \"no v3 candidates attempted\".to_string()\n        } else {\n            v3_errors.join(\" | \")\n        };\n\n        let prime_suffix = prime_error\n            .as_deref()\n            .map(|msg| format!(\" ({msg})\"))\n            .unwrap_or_default();\n\n        if text.is_some() {\n            anyhow::bail!(\n                \"Composio v3 NLP execute failed on candidates ({v3_error_summary}){prime_suffix}{}\",\n                build_connected_account_hint(\n                    app_hint.as_deref(),\n                    normalized_entity_id.as_deref(),\n                    resolved_account_ref.as_deref(),\n                )\n            );\n        }\n\n        anyhow::bail!(\n            \"Composio execute failed on v3 ({v3_error_summary}){prime_suffix}{}\",\n            build_connected_account_hint(\n                app_hint.as_deref(),\n                normalized_entity_id.as_deref(),\n                resolved_account_ref.as_deref(),\n            )\n        );\n    }","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/composio.rs#L245-L281","documentation":"NLP-mode failure: execute_action was called with a natural-language 'text' argument (instead of structured params) and every slug candidate failed against POST /tools/execute/{slug}. v3_error_summary aggregates each attempt as 'slug: error | ...' using the per-candidate HTTP errors from execute_action_v3. prime_suffix is appended when the automatic action-list refresh also failed, and build_connected_account_hint appends a list_accounts suggestion when no connected_account_id was passed or auto-resolved. The outer execute() wrapper reports it as 'Action execution failed: ...' in ToolResult.error.","triggerScenarios":"action='execute' with text set, where: no connected account exists for the (app, entity_id) pair; the account's OAuth token expired or was revoked; Composio's NLP could not resolve parameters from the text; every derived slug candidate (cache hit plus underscore/hyphen/case variants) 404s; the API key is invalid (401) or rate-limited (429).","commonSituations":"Agent executes before the user finished the OAuth connect flow; account connected under a different user_id than the entity_id in use (composio.entity_id default vs per-call entity_id); free-text commands for a tool that Composio renamed upstream; NLP-mode restrictions on the current Composio plan.","solutions":["Read v3_error_summary: each 'slug: HTTP ...' segment names the candidate tried and the server response — 404 means bad slug, 400 param problems, 401 bad key, 429 pacing.","Run action='list_accounts' with the app and entity_id: if an account exists, pass its id as connected_account_id; if none, run action='connect', complete OAuth, and retry.","Run action='list' with the app and pass the exact slug as tool_slug to skip candidate guessing.","If NLP parameter resolution failed (400 param errors), switch from text to structured params using the listed [params: ...] key names.","On 401/429, fix the API key or back off."],"exampleFix":"// before: NLP mode, no pinned account\nlet args = json!({\"action\": \"execute\", \"app\": \"github\", \"text\": \"star the repo zeroclaw/zeroclaw\"});\n\n// after: exact slug + structured params + explicit account\nlet args = json!({\n    \"action\": \"execute\",\n    \"tool_slug\": \"github-star-repository\", // exact slug from action='list'\n    \"params\": {\"owner\": \"zeroclaw\", \"repo\": \"zeroclaw\"},\n    \"connected_account_id\": \"<id from action='list_accounts'>\"\n});","handlingStrategy":"fallback","validationCode":"// Before NLP-mode execute, verify the user has a usable connected account\nlet accounts = tool\n    .execute(json!({\"action\": \"list_accounts\", \"app\": \"github\", \"entity_id\": entity_id}))\n    .await?;\nlet out = accounts.output.to_string();\nif out.contains(\"No connected accounts\") {\n    anyhow::bail!(\"run action='connect' for 'github' before executing\");\n}","typeGuard":null,"tryCatchPattern":"match tool.execute(args).await {\n    Ok(r) if r.success => { /* done */ }\n    Ok(r) => {\n        let e = r.error.unwrap_or_default();\n        if e.contains(\"NLP execute failed on candidates\") {\n            // fall back: pin tool_slug + structured params from action='list'\n            // instead of retrying the same free-text call\n        }\n    }\n    Err(e) => { /* transport failure */ }\n}","preventionTips":["Prefer structured params plus an exact tool_slug over free text","Complete action='connect' (OAuth) before the first execute per user/app","Pass connected_account_id explicitly in multi-account setups","Keep entity_id consistent between connect and execute"],"tags":["composio","rust","nlp","oauth","execute","agent-tools"],"backgroundTag":"action-execution-failed","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}