Skip to Content
Rius

How do I track usage per developer in Claude Code?

Rius tracks Claude Code usage per developer: each developer installs the plugin, signs in, and enables a folder, and their sessions appear under their email. With plugin 0.6.2 or later, every span carries the email the developer signed in with as user.id. The Users page then lists each developer with their traces, failed traces and cost. Tracing is off until each developer turns it on for a folder, so nobody is traced without running the command themselves.

How it works

One Claude Code session is one trace. The trace holds each turn, each model call with its tokens, cache reads and writes and cost, each tool call, and each subagent with its own tokens.

The plugin sets user.id to the email the developer used at /rius:login. Nothing in the environment can change it. That is what splits usage by developer:

  • Users page. Each developer gets a row with Traces (one per session), Failed traces and Cost for the selected window, 7 days by default. Sort by Cost to see who drives spend, then open a developer to see their recent and failed sessions.
  • Trace list. One row per session. The Sent by column names the owner of the key that sent it, and clicking it filters the list to one developer.
  • Agents page. Claude Code shows as an agent named claude-code, with its traces, errors and cost for the window, and each open session as a live instance.

A folder enabled with /rius:enable-here sends structure only: the span tree, models, tokens, cost, timing, tool names and error types, plus the email, the folder path and the git branch. It sends no prompts, replies, file contents or command output. The folder path can include the local user name.

Set it up

Use one shared workspace so every developer’s usage adds up in one place. A workspace admin invites teammates, and each teammate accepts and then picks the team workspace at sign-in. Each developer then does the following.

  1. Install the plugin in a terminal. Full install options, including installing from inside Claude Code, are in the Claude Code plugin guide.

    claude plugin marketplace add glassflow/rius-coding-agents && claude plugin install rius@rius-coding-agents
  2. Sign in. In the browser, sign in, pick the team workspace and click Connect. The plugin stores a key for that machine and workspace, and the sign-in email becomes the developer’s name on the Users page.

    /rius:login
  3. Turn tracing on in each repo you want counted.

    /rius:enable-here
  4. Check the state. The first line should read Rius tracing: on.

    /rius:status
  5. Start Claude Code from inside the enabled repo, not from a parent folder. A session started elsewhere can stop being traced partway through.

To also send prompts, replies, tool inputs and tool outputs from a repo, run /rius:enable-content-here instead of /rius:enable-here. The plugin removes the secrets it recognizes first, on a best-effort basis. Everyone in the workspace can read what is sent, so agree as a team which repos send content. To stop tracing a folder, run /rius:disable-here. A disabled folder always wins, at any depth.

The full rollout, including how to read cost across a team, is in Track Claude Code usage and cost across a team.

What you get

  • A row per developer with sessions, failed sessions and cost, sortable by cost.
  • A per-session waterfall with tokens and cost on each model call, and failed tool calls marked as errors, so you can go from a developer’s cost to the exact step.
  • Subagent tokens and cost on their own spans. In long sessions, subagents can account for more than half of all tokens.
  • Questions answered from the terminal: run /mcp, pick rius, sign in once, and ask Claude which sessions cost the most.

What Claude Code tracing does not report, so you read the numbers correctly:

  • Cost is not your bill. Rius prices tokens at API rates. On a Claude Pro or Max subscription, cost measures usage, not what you pay.
  • Counts wait for the session to end. The Users and Agents figures count a session once it has ended. The trace list shows it while it runs. A session that never ends cleanly, because Claude Code crashed or was killed, is never counted there.
  • Some sessions have no developer. Sessions from plugin versions before 0.6.2, and sessions sent with an existing API key instead of /rius:login, carry no developer and land in the anonymous row.
  • Model-call durations are approximate. A model span’s duration can include time spent reading or approving a permission prompt. Tool durations are exact.
  • Structure-only folders have no text. You see models, tokens and cost but not prompts or replies.

When something else fits

  • If your developers use other coding agents, see Coding agents. Codex (beta) and Cursor (beta) use the same plugin and also show by sign-in email, but Cursor sessions carry no token counts or cost. OpenHands needs no plugin and shows developers by the user_id you pass.
  • If you want only your own sessions rather than a team view, the single-developer steps in the Claude Code plugin guide are enough.

Still stuck? Get help

Last updated on