How do I trace Claude Code in only one repository?
Rius traces Claude Code in a single repository when you run /rius:enable-here in that repo’s folder, because tracing stays off everywhere else. Start Claude Code from that folder and each session becomes one trace in your workspace. Repositories you have not enabled send nothing. The folder rule covers the folder and everything under it.
How it works
Installing the Rius plugin sends nothing. Tracing is off for every folder until you turn it on, and only you can do that: Claude cannot run the enable command for you, and a repository’s own settings cannot switch tracing on.
- One rule per folder.
/rius:enable-hereadds a rule for the folder you run it in. The rule applies to that folder and everything under it, so a monorepo with several packages is traced as a whole. - Rules are stored on your machine. They live in
~/.claude/rius/config.jsonand apply to every Claude Code session on that machine. Whether a session is traced depends on the folder it runs in. - Structure only by default. An enabled folder sends the span tree, models, tokens, cost, timing, tool names and error types. Prompts, replies, file contents and command output stay out.
- A disabled folder always wins. If one directory inside your repo should stay out, run
/rius:disable-herethere. Enabling a folder inside a disabled one leaves it off, and the plugin tells you which folder to enable instead.
The full command reference is on the Claude Code plugin page.
Set it up
-
Install the plugin and sign in once per machine. Skip this if you already have. The Claude Code plugin page covers both in full, including installing from inside Claude Code.
claude plugin marketplace add glassflow/rius-coding-agents && claude plugin install rius@rius-coding-agentsThen run
/rius:loginin Claude Code, pick a workspace and click Connect. -
Change into the repository and start Claude Code from there. The rule you add in the next step is for this folder, so launch the session here and not from a parent directory or another project.
cd ~/code/app claude -
Turn tracing on for this folder:
/rius:enable-hereIf a session is already open in the folder when you enable it, it is traced from its start, and everything said earlier in that session is sent too. To trace only from now on, run the command and then start a new session.
-
Check the result:
/rius:statusThe first line should read
Rius tracing: on. TheReasonline names the rule that decided it, and thecwdline shows the folder the session runs in. Content readsnone (structure only). -
Work as usual, then open the trace list in the console. The session shows up while it is still running and is marked in progress until you exit Claude Code.
Two optional adjustments. To send prompts, replies and tool inputs and outputs from this repo too, run /rius:enable-content-here instead of step 3. Recognised secrets are removed, but that redaction is best effort. To keep a subfolder out, run /rius:disable-here inside it.
What you get
- Sessions from this repository appear as traces, each with its model calls, tool calls and subagents laid out as a waterfall, with tokens and cost.
- Nothing from your other repositories leaves the machine, because they have no rule.
- A clear check at any time:
/rius:statustells you whether the current folder is traced and why. - A choice of detail per folder. Structure only is the default, and content is a separate command you run on purpose.
- A way to stop.
/rius:disable-hereends tracing for the folder. A session already running closes its trace when it ends, sending only structure.
When something else fits
- If you want every project under a parent directory traced, enable the parent, then disable any folder you want kept out.
- If you want to pause tracing for one session only without touching the folder rules,
/rius:offdoes that. See the Coding agents overview for how Codex (beta), Cursor (beta) and OpenHands handle opting in.