How do I track failed tool calls in Cursor (beta)?
Rius traces Cursor chats (beta) with the Rius plugin and records every tool call as a span, so a failed call shows as an error on its own step. Turn tracing on for a folder with /rius-enable-here, and each chat becomes one trace in Rius, where a shell command that exits non-zero is marked as an error. Open the trace to see which tool failed, or ask Cursor over MCP. Cursor traces carry no token counts or cost, so you track failures, not spend.
How it works
The plugin turns each Cursor agent chat into one trace, and each tool call inside it is its own span.
- Where a tool call sits. A chat is the root, each prompt and everything it caused is a turn, and each tool call is a tool span under the model’s answer. A subagent appears under the Task call that started it, with its own tool calls.
- What counts as failed. A shell command that exits non-zero is an error. Tool names and error types are recorded even in structure-only mode.
- How much detail you get. With
/rius-enable-hereyou see the span tree, timing, status, model names, tool names and error types. With/rius-enable-content-hereyou also get tool inputs and outputs and tool error details. The plugin replaces the secrets it recognizes first, on a best-effort basis, and caps each value at 32 KB. - When spans arrive. Spans are sent while you work: when the chat starts, after each answer, and every 20 tool calls. The trace closes when Cursor ends the session. If Cursor never says so, your next chat closes it once it has been idle for 12 hours.
The same plugin also traces other coding agents, each with its own sign-in and folder rules.
Set it up
- Install the plugin. In Cursor’s plugin settings, choose Import from Repo and enter
glassflow/rius-coding-agents. Cursor support needs plugin 0.6.0 or later, Python 3.9 or later on yourPATH, and macOS or Linux. Installing sends nothing. The Cursor guide covers the install, oldercursor-agentversions and the clone fallback in full. - Sign in and turn tracing on for the folder. In the agent chat, run these commands. After
/rius-login, pick a workspace in the browser and click Connect.
/rius-login
/rius-enable-here
/rius-status- Choose how much to send.
/rius-enable-hereis enough to see which tool failed and with what error type. Run/rius-enable-content-hereinstead if you also want the tool’s input, output and error details. A folder you disable with/rius-disable-herestays off at any depth. To turn tracing off for one chat only, run/rius-off. - Work as usual, then find the failure. Open the trace list at
console.rius-glassflow.comand open the chat. In the waterfall, the failed tool call is marked as an error on its own span. The Sent by column shows whose key sent each chat. - Or ask from Cursor. The plugin registers the Rius MCP server as
rius. Click Connect next toriusin Cursor’s MCP settings, or run this in a terminal. This is a second sign-in, separate from/rius-login.
cursor-agent mcp login riusThen ask: “Show me my last failed Cursor chat and which tool call went wrong.”
What you get
- One trace per chat with every tool call in order, so you go from a failed chat to the exact step.
- Errors marked on the span, with the tool name and error type, and with content enabled the input, output and error details.
- The chat under an agent named
cursoron the Agents page. A chat counts in the agent’s figures once its trace is closed. The plugin sends no heartbeat, so Cursor chats do not appear under Instances. - Chats under your name on the Users page, because from plugin 0.6.2 every span carries
user.id, set to the email you signed in with. Chats sent with a key stored byuse-keycarry no user and land in the anonymous row.
What Cursor does not report:
- No token counts and no cost, because Cursor’s hooks do not report usage.
- Cursor’s cloud and background agents and Tab completions are not traced.
- Span times are when Cursor reported each step, not when the model call started.
- Tool calls in an interactive
cursor-agentsession, the agent in the Cursor editor and Import from Repo are not tested yet, so details may change during the beta.
When something else fits
- If you need tokens and cost next to your failures, Claude Code sessions carry both. See Track Claude Code usage and cost across a team.
- If your failures happen in Cursor’s cloud or background agents, the plugin does not trace them, so you need another source for those runs.
Related
Last updated on