Bonus: Watch a bloated tool call eat your context window
You run Rius on your laptop and give Claude Code a tool that answers every question with the whole company handbook. Then you watch the context window fill up, and see in Rius which tool did it.
Time: about 20 minutes, once the images are on your laptop.
This is the local guide: Rius runs on your laptop in Docker. No Docker, or no time for a 0.9 GB download? Follow the cloud guide.
Download the images at home, before the workshop (last part of “Before you start”). The venue Wi-Fi can’t serve 0.9 GB to the whole room. Picked local Rius in the setup? You have the images already: don’t download them again.
Before you start
- Claude Code is installed and signed in (the Everyone part of the setup).
- Docker is running, with at least 4 GB of memory and 4 GB of free disk.
make,jq,curl,ncandopensslwork. A Mac with the Xcode Command Line Tools has them all. On Linux:sudo apt install make jq netcat-openbsd curl openssl.- Already use Rius cloud? This guide switches your Claude Code to the local Rius and revokes your
cloud key. Run
/rius:loginafterwards to get a new one.
Picked local Rius in the setup? You have the rius folder and its images already: skip
this. Otherwise, at home, download Rius and pull its images:
curl -LO https://workshop-munich.glassflow.ai/rius-local.zip
unzip rius-local.zip && cd rius
make -C compose pullYou should see one Pulled line per image. If it stalls, press Ctrl-C and run the last line again.
The images stop working after the workshop (30 October).
What you use
- Rius, in containers on your laptop. No sign-in.
- The Rius plugin sends Rius the shape of each Claude Code session: model calls, tool calls and token counts. It never sends your prompts, replies or files.
- bloat is a tiny MCP server with one tool,
search_handbook. Every answer comes with the whole 44 KB handbook. Its code is public.
Steps
Start Rius
In the rius folder:
make -C compose upAfter about 15 seconds you should see:
Console: http://localhost:3100
OTLP: http://localhost:4318/v1/traces
API: http://localhost:8090If a port is taken, the message tells you what to change in compose/.env. Port 4318 must stay
free.
Install the Rius plugin
claude plugin marketplace add glassflow/rius-coding-agents
claude plugin install rius@rius-coding-agentsYou should see Successfully installed plugin: rius@rius-coding-agents (scope: user).
Already have it? Run claude plugin update rius@rius-coding-agents instead. You need 0.8.2 or
later.
Point the plugin at your Rius
Picked local Rius in the setup? This is done already: skip this step.
Still in the rius folder:
RIUS_PLUGIN=$(claude plugin list --json | jq -r 'map(select(.id=="rius@rius-coding-agents")) | max_by(.version | split(".") | map(tonumber? // 0)) | .installPath')
make -s -C compose key | bash "$RIUS_PLUGIN/scripts/rius_ctl.sh" use-key --env localYou should see Stored the key for local; it is sent only to http://localhost:4318.
Make a folder and add bloat
mkdir -p ~/rius-track && cd ~/rius-track
claude mcp add --transport http bloat https://bloat-mcp.vercel.app/mcp
claude mcp listYou should see bloat: https://bloat-mcp.vercel.app/mcp (HTTP) - ✔ Connected. You’ll also see
plugin:rius:rius … Needs authentication: that’s for Rius cloud, so ignore it here.
Trace this folder
claude- Asked whether you trust the folder? Pick Yes, I trust this folder.
- Asked about auto mode? Pick No, keep manual mode.
Then run:
/rius:enable-hereYou should see Rius tracing enabled for /…/rius-track and everything under it.
Start a fresh session
Type /exit, then start Claude Code again:
claudeYou should see Rius: tracing this session. Check how full the context is:
/contextNote the first number, for example 29.8k/1m tokens (3%).
Ask the bloated question
Paste this prompt:
Use the bloat handbook search to answer three questions: how many vacation days do full-time staff get, how soon must expense reports be filed, and how often are laptops replaced? Search once per question. Save the answers to answers.md, then read the file back and tell me what it says.Claude Code asks twice:
- Before the first search: pick Yes, and don’t ask again for bloat.
- Before it creates
answers.md: pick Yes.
You should get the answers: 28 days of vacation, expenses within 30 days, laptops every 36 months.
Watch the context window jump
/contextIt’s about 60k tokens higher, for example 88.6k/1m tokens (9%). Three one-line answers cost
three copies of the handbook, and they stay in the context for the rest of the session.
See it in Rius
Open localhost:3100 .
- Traces: open the newest
claude-code session. The Context growth bars jump right after the three handbook searches, and stay high. - Alerts: within 1 to 3 minutes, Recent firings shows
CF-15 on mcp__bloat__search_handbook in claude-code, rule Context rot. CF-15 is Rius’s code for context rot.
The alert also went to a local webhook. In another terminal, in the rius folder:
make -C compose alertsYou should see something like
mcp__bloat__search_handbook results took 50% of the context on LLM call 3 and stayed for 2 more calls.
See where the tokens went
Type /exit first: this page only counts finished sessions.
In the console, open Agents → claude-code and look at Context. tool calls and results
is now about a third of everything Claude Code sent, almost all of it handbook copies.
What just happened
- bloat returned the whole handbook for every question.
- Claude Code keeps every tool result, so each copy was sent again with every later model call.
- Rius sees how much of each call came from each tool. When one tool takes 30% or more of the context and it stays there, Rius raises a Context rot alert.
If something is off
pullorupsaysdeniedorunauthorized: ask a facilitator, or switch to the cloud guide.- A port is taken: set the variable the message names in
compose/.envand run it again. For 4318, stop whatever uses it (often a local OpenTelemetry collector). Shell command permission check failed: runclaude plugin update rius@rius-coding-agentsin a terminal, then restartclaude./rius:enable-hererefuses your folder: run it inside~/rius-track, not your home folder.- No
Rius: tracing this sessionline: repeat “Point the plugin at your Rius”, then run/rius:enable-hereagain. - Claude Code answers without searching: run
/mcpand checkbloatis connected. - No trace in the console: run
make -C compose smokein theriusfolder. The last line should beSMOKE OK. - No alert after 5 minutes: check
claude plugin listshows Rius 0.8.2 or later, then ask one more question in the same session. - The Agents page looks empty: type
/exitin Claude Code and reload the page. - Don’t rename the session (
/rename): Rius files it under the new name.
Clean up
In the rius folder, then in ~/rius-track:
make -C compose down
cd ~/rius-track
claude mcp remove bloatmake -C compose reset also deletes the data. To use Rius cloud again, run /rius:login. To stop
tracing the folder, run /rius:disable-here in it.
What’s next
We show you a workspace that has been busy for a while: alerts with their root-cause analyses, a session that lost history when its context was compacted, and the sessions of a whole team.