ComposioHQ/composio · error · Error
Failed to execute local tool
Error message
Failed to execute local tool ${context.finalSlug}: ${toErrorMessage(error)} What it means
A catch-all wrapper around every local tool execution path (command, MCP, FFI). Any underlying error — argument failures, spawn errors, non-zero exits, FFI load failures — is rethrown with the tool slug prefixed and the original error attached as cause. Seeing this error means looking at the message suffix (and cause) for the real failure.
Solutions
- Inspect the message suffix and error.cause for the root error
- Fix the underlying cause (missing binary, permissions, bad args)
- Catch this error and log error.cause for actionable diagnostics
Defensive patterns
Strategy: try-catch
Try / catch
try { await executeLocalTool(slug, args, ctx); } catch (e) { const root = (e as Error & { cause?: unknown }).cause ?? e; console.error(root); } Prevention
- Always inspect error.cause — the wrapper hides the root error in the suffix
- Log cause chains in local-tool pipelines
When it happens
Trigger: Any exception thrown inside runLocalCommandTool/runLocalMcpTool/runLocalFfiTool during executeLocalTool; the cause chain contains errors 242–245 or spawn errors like ENOENT.
Common situations: Generic failure surfacing when a local tool breaks for any reason; often wraps ENOENT when the command binary is not on PATH.
Related errors
- Bundled binary was not found for and no fallback command…
- Bundled FFI library was not found for .
- Invalid arguments for local tool
- Local command failed for
- Local FFI execution requires the Bun runtime used by the…
AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28).
Data as JSON: /api/errors/0d71a7a1cad517bd.
Report an issue: GitHub.
Appendix: source
Thrown at ts/packages/cli-local-tools/src/runtime.ts:290
export const executeLocalTool = async (
execution: LocalToolExecution,
input: Record<string, unknown>,
context: LocalExecutionContext
): Promise<LocalExecutionResult> => {
try {
if (execution.kind === 'native') {
return await execution.execute(input, context);
}
if (execution.kind === 'command') {
return await runLocalCommand(execution, input, context);
}
if (execution.kind === 'mcp') {
return await runLocalMcpTool(execution, input);
}
return await runLocalFfiTool(execution, input, context);
} catch (error) {
throw new Error(`Failed to execute local tool ${context.finalSlug}: ${toErrorMessage(error)}`, {
cause: error,
});
}
};
View on GitHub (pinned to 64b1b85502)