Skip to Content

How do I track subagents in Cursor (beta)?

Rius traces Cursor agent chats (beta) and records each subagent as its own span, nested under the Task call that started it. You turn it on with the Rius plugin: install it, sign in with /rius-login, and run /rius-enable-here in a folder. Subagent spans show their place in the chat, timing, status and tool calls. They carry no token counts or cost, because Cursor does not give plugins usage data.

How it works

The Rius plugin turns each Cursor agent chat into one trace. It is built for the agent in the Cursor editor and for cursor-agent in the terminal, and the beta is tested mostly on headless cursor-agent -p runs. A subagent appears inside that trace as an agent span under the Task call that started it:

AGENT cursor session └─ CHAIN a turn: one prompt and everything it caused └─ LLM the answer, with its model └─ TOOL a tool call. A shell command that exits non-zero is an error. └─ AGENT a subagent, under the Task call that started it

Subagents are captured in both folder modes:

  • Structure only (/rius-enable-here) sends the span tree, timing, status, model names, tool names, error types and subagents. It sends no prompts, answers, tool inputs or tool outputs.
  • With content (/rius-enable-content-here) adds your prompts, the agent’s answers, and tool inputs and outputs. The plugin replaces the secrets it recognizes first. This is best effort, so a secret in a format it does not know is sent.

Spans arrive while you work: when the chat starts, after each answer, and every 20 tool calls. A chat’s 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 Cursor does not report matters for subagents too. Cursor traces have no token counts and no cost, so a subagent span shows no tokens and no price, and you cannot see what a subagent cost compared with the main chat. 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.

Set it up

Cursor support needs version 0.6.0 or later of the Rius plugin, Python 3.9 or later on your PATH, and bash. It runs on macOS and Linux. Windows is untested for Cursor.

  1. Install the plugin. In Cursor’s plugin settings, choose Import from Repo and enter glassflow/rius-coding-agents. Installing sends nothing, and tracing stays off for every folder until you enable one. If Import from Repo fails, the Cursor guide gives a clone-based alternative. It also covers cursor-agent releases that ignore hooks coming from a plugin.
  2. Sign in and turn tracing on. In the agent chat, run the commands below. /rius-login opens the browser, where you choose a workspace and click Connect. /rius-status shows whether the folder is traced and why.
/rius-login /rius-enable-here /rius-status
  1. Use content mode only where you want it. Run /rius-enable-content-here in a folder if you want the prompt and tool input for each subagent. /rius-disable-here stops tracing a folder, and a disabled folder always wins over an enabled parent.
  2. Work as usual. Start a chat that makes the agent use subagents.
  3. Find the chat. Open the trace list in the Rius console at console.rius-glassflow.com. Each chat is one trace. Open it to see the waterfall, with each subagent under its Task call.

The commands only run when you type them, and Cursor may ask you to approve the script they run. The Cursor guide covers signing in, key handling and uninstalling in full. For the other coding agents, see Coding agents.

What you get

  • Subagents in context. The trace shows which Task call started each subagent, so you can follow a chat from the prompt to the subagent’s own tool calls.
  • Errors on the right step. A tool call that fails is marked as an error on its span, and a shell command that exits non-zero counts as an error. You can find which subagent or tool call went wrong.
  • A Cursor agent on the Agents page. Chats appear as an agent named cursor. The plugin sends no heartbeat, so Cursor chats do not appear under Instances. A chat counts in the agent’s figures once its trace is closed.
  • Chats under your name. With plugin 0.6.2 or later, every span carries your sign-in email as user.id, so your chats appear on the Users page. Chats sent with a key you stored yourself carry no user and land in the anonymous row. The Sent by column in the trace list shows whose key sent each trace.
  • Questions in plain language. The plugin registers the Rius MCP server as rius. Click Connect next to rius in Cursor’s MCP settings, or run cursor-agent mcp login rius. This is a second sign-in, separate from /rius-login. Then ask, for example, “Show me my last failed Cursor chat and which tool call went wrong.”

Cursor support is in beta. It is tested against hook payloads from real cursor-agent sessions, mostly headless runs. Tool calls in an interactive cursor-agent session, the agent in the Cursor editor and Import from Repo are not tested yet, so some details may change.

When something else fits

  • If you need tokens and cost for each subagent, Claude Code is the fit. Its subagents are nested under the call that started them, each with its own model calls, tokens and cost. See Track Claude Code usage and cost across a team.
  • If you need to trace Cursor’s cloud or background agents, Rius does not cover them, so Cursor’s own tools are the place to look.

Still stuck? Get help

Last updated on