You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generic calle mcp call get_call_run route reports exit code 0 and top-level ok: true for an MCP tool result with isError: true. The dedicated calle call status route reports the same failed lookup with exit code 1 and ok: false.
Reproduced against commit 4a53b01ec92cbe9ccae506bd9ea77935a73f3bf7, CLI 0.5.1/core 0.3.1, Node v22.23.2. The raw nested result.isError is preserved, but shell automation checking exit status or top-level ok can take its success branch incorrectly.
The fixture injects an HTTP 200 JSON-RPC response containing result: { isError: true, content: [{ type: 'text', text: 'Fixture status lookup failed' }] }. It exercises both CLI routes against tool success, tool failure and JSON-RPC failure. Only generic MCP + tool failure signals success before the patch. All six cases behave consistently after checking result?.isError === true, setting top-level ok accordingly and returning exit code 1 for a failed tool.
No real API calls, phone calls or credentials were used. The fixture blocks global network access, disables telemetry and browser access, and deletes its synthetic temporary cache. This is an offline command-signaling report, separate from SSE parsing issue #110.
Suggested documentation addition: show how HTTP/JSON-RPC transport success, tool execution success and the call lifecycle state differ, including the exit code for each. A successful status lookup does not necessarily mean a successful telephone call.
Prepared with OpenAI Codex assistance for Roman Vinogradov. The reproduction and patched control cases were executed locally.
Priority: P1 — command signaling can send automation down the wrong branch around real-call tools.
The reproduction confirms that HTTP/JSON-RPC success and MCP tool success are currently conflated by generic calle mcp call. Returning exit 0 and top-level ok: true for isError: true can make an agent proceed after a failed plan/status request or make unsafe retry decisions around run_call.
Recommended fix and validation:
Return exit 1 and top-level ok: false whenever the exact MCP tool result has isError: true, while preserving the raw result for diagnostics.
Treat retryability conservatively. For run_call or an unknown tool, missing call_started/retry_safe metadata must not default to false/true; the request may already have caused a real-world side effect. Reuse the dedicated call-stage recovery semantics.
Keep the CLI-authored error summary separate from remote text. Sanitize and bound any remote code/message, strip terminal controls and credential-shaped values, and never echo extra structured fields.
Test tool success, hostile tool errors, JSON-RPC errors, run_call errors with and without side-effect metadata, arbitrary tool names, exit codes, stdout/stderr, and absence of secrets. Include the patch changeset.
PR #128 targets the signaling bug, but its current head still republishes remote messages and defaults a generic run_call error to call_started: false / retry_safe: true; those blockers need fixing before merge.
Activity
Ray-56 commentedon Sep 14, 2026
Priority: P1 — command signaling can send automation down the wrong branch around real-call tools.
The reproduction confirms that HTTP/JSON-RPC success and MCP tool success are currently conflated by generic
calle mcp call. Returning exit 0 and top-levelok: trueforisError: truecan make an agent proceed after a failed plan/status request or make unsafe retry decisions aroundrun_call.Recommended fix and validation:
ok: falsewhenever the exact MCP tool result hasisError: true, while preserving the raw result for diagnostics.run_callor an unknown tool, missingcall_started/retry_safemetadata must not default tofalse/true; the request may already have caused a real-world side effect. Reuse the dedicated call-stage recovery semantics.run_callerrors with and without side-effect metadata, arbitrary tool names, exit codes, stdout/stderr, and absence of secrets. Include the patch changeset.PR #128 targets the signaling bug, but its current head still republishes remote messages and defaults a generic
run_callerror tocall_started: false/retry_safe: true; those blockers need fixing before merge.fix(cli): treat MCP tool isError as a failed mcp call