How do I find the longest-running sessions in Cursor (beta)?
Rius records each Cursor (beta) chat as one trace, so you find the longest-running sessions by sorting the Spans tab by Duration. The trace list also shows the latency of every chat, and you can open any trace to see where the time went. Cursor sessions carry no token counts or cost, so duration is the measure to use.
How it works
The Rius plugin for Cursor (beta) turns each agent chat into one trace. The root of the tree is an agent span for the session. Under it sit the turns, the answers with their models, the tool calls and any subagents, all with timing.
That timing is what makes long sessions findable:
- Trace list. The Traces page shows a latency value for each chat, next to the agent name, span count and error count. Chats appear under an agent named
cursor. The strip above the list sums up latency percentiles for the chats that match your filters. - Spans tab. It lists individual spans and lets you sort by the Duration header. Use the All kinds menu to pick Agent, and filter to the
cursoragent, so the session roots come first. - Who ran it. From plugin 0.6.2, each span carries
user.id, set to the email you signed in with. Click your name in the User column, or a name in Sent by, to see only your chats.
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. Span times are when Cursor reported each step, not when the model call started, so read durations as the chat’s pace rather than exact model latency.
Set it up
- Install the plugin. In Cursor’s plugin settings, choose Import from Repo and enter
glassflow/rius-coding-agents. Import from Repo is not tested yet, so if it fails, clone the repo into~/.cursor/plugins/local/rius. The Cursor guide covers install, sign-in and oldercursor-agentversions. - In the agent chat, sign in and turn tracing on for the repo you work in. Tracing is off for every folder until you do this.
/rius-login
/rius-enable-here
/rius-status- Work as usual. Use
/rius-statusto confirm the folder is traced. - Open Traces in the console and set the time range. The default is 7 days, and the presets go up to 30 days.
- Add a filter on the agent
cursor, or click your name in the User column, so only your Cursor chats remain. Read the latency column for the slow ones. - To rank them, open the Spans tab, choose Agent in the All kinds menu and click the Duration header. Subagents are agent spans too, so a long subagent can also appear in this list.
- Click a trace ID to open the chat. The waterfall shows every turn, tool call and subagent in order, and the Map tab has a latency lens that shows where the time went. The exploring traces page covers filters, saved searches and keyboard shortcuts for stepping through spans.
What you get
- A ranked list of your slowest Cursor chats, from the Duration sort on the Spans tab, plus a latency value on every row of the trace list.
- A way to go from a slow chat to the step behind it: a long tool call, a failed shell command, or a subagent that ran for a while. A shell command that exits non-zero is marked as an error.
- A saved search for your slow chats. Save the filters from the Traces filter bar and come back to them. A relative range such as the last 7 days moves with you.
- A shared view of the filtered list, if you want to hand a slow chat to a teammate. It carries summary tiles and metadata only, never span content. Use an Add filter chip for the agent, because the agent selection is not part of a shared view.
- The same views for Claude Code, where sessions also show tokens and cost per developer. All of this sits within the Coding agents guides.
Cursor chats show no tokens and no cost, so you cannot sort them by spend. Not traced: Cursor’s cloud and background agents, and Tab completions. A chat counts in the agent’s figures only once its trace is closed.
When something else fits
- If you want the most expensive sessions rather than the longest, use Claude Code or Codex (beta), which report tokens and cost. Cursor’s hooks do not report usage.
- If you want to ask in plain language, connect the Rius MCP server from Cursor’s MCP settings and ask for your recent Cursor chats. It is a second sign-in, separate from
/rius-login.