Skip to Content

How do I track every tool call in Cursor (beta)?

Rius records each tool call in a Cursor (beta) chat as its own span, once you install the Rius plugin and run /rius-enable-here in a folder. Each chat becomes one trace, and tool names, errors and subagents are in it by default. Cursor (beta) reports no token counts, so these traces carry no tokens and no cost. Tool inputs and outputs are sent only from folders where you turn content on.

How it works

The Rius plugin for Cursor (beta) turns each agent chat into one trace. It is built for the agent in the Cursor editor and for cursor-agent in the terminal. A tool call appears as a span of the Tool kind inside the turn that caused it:

  • Chat: the root of the trace.
  • Turn: one prompt and everything it caused.
  • Answer: the model call, with its model name.
  • Tool call: one span per call. A shell command that exits non-zero is marked as an error.
  • Subagent: nested under the Task call that started it, with its own tool calls.

Spans arrive 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.

What a tool call carries depends on how you enabled the folder:

  • Structure only (/rius-enable-here): tool names, error types, timing, status and subagents. No prompts, answers, or tool inputs and outputs.
  • With content (/rius-enable-content-here): the same, plus prompts, answers, and tool inputs and outputs. The plugin replaces secrets it recognizes, such as cloud and API keys, tokens and private keys, with a marker and caps each value at 32 KB. This is best effort, so a secret in a format it does not know is sent.

Tracing stays off for every folder until you enable one, and installing sends nothing.

Set it up

  1. Install the plugin. In Cursor’s plugin settings (beta support needs plugin 0.6.0 or later), choose Import from Repo and enter glassflow/rius-coding-agents. You need Python 3.9 or later on your PATH, and bash, on macOS or Linux. Windows is untested for Cursor (beta). The Cursor (beta) guide covers the clone fallback and older cursor-agent versions.
  2. Sign in. In the agent chat, run /rius-login. In the browser, check that the code and machine name match, pick a workspace and click Connect.
  3. Turn tracing on for a folder. Run /rius-enable-here for structure only, or /rius-enable-content-here if you also want tool inputs and outputs. Then run /rius-status to confirm the folder is traced and see why.
  4. Work as usual. Each chat shows up in the trace list in the Rius console.
  5. Pause or stop when needed. /rius-on and /rius-off switch tracing for the current chat only. /rius-disable-here stops a folder, and a disabled folder beats any enabled parent folder.
/rius-login /rius-enable-here /rius-status

If /rius-status says no path rule matches, run /rius-enable-here in that folder. If it says there is no key, run /rius-login. If nothing arrives from cursor-agent, an older version may be ignoring plugin hooks, which the Cursor (beta) guide explains.

What you get

  • Every tool call as a span. Open a chat in the trace list and the waterfall shows each turn, answer, tool call and subagent in order. A failed shell command is marked as an error, so you can go from a bad chat to the exact step. In the Spans tab, the All kinds menu filters to the Tool kind.
  • Tool names and error types in every enabled folder, even with content off.
  • Tool inputs and outputs from folders where you enabled content.
  • Per-developer views. With plugin 0.6.2 or later, every span carries your sign-in email as user.id, so your chats appear under your name on the Users page. The Sent by column in the trace list shows whose key sent each chat.
  • An agent named cursor on the Agents page. The plugin sends no heartbeat, so Cursor (beta) chats do not appear under Instances, and a chat counts in the agent’s figures once its trace is closed.
  • Questions in plain language. The plugin registers the Rius MCP server as rius. Click Connect next to rius in Cursor’s MCP settings (a second sign-in, separate from /rius-login), then ask “Which tools did my Cursor chats call most this week?” or “Show me my last failed Cursor chat and which tool call went wrong.”

What Cursor (beta) does not report:

  • No tokens and no cost. Cursor’s hooks do not give plugins usage, so these traces show the span tree, timing, models, tools and errors only.
  • No cloud or background agents, and no Tab completions. They are not traced.
  • Span times are approximate. They are when Cursor reported each step, not when the model call started.
  • Some paths are still untested. Tool calls in an interactive cursor-agent session, the agent in the Cursor editor and Import from Repo have not been tested yet, so some details may change.

When something else fits

If you need tokens and cost for coding sessions, Claude Code reports both, and so does Codex (beta). To compare all the supported agents side by side, see Coding agents.

Still stuck? Get help

Last updated on