Rumrunner

Rules and fences

One file, ~/Library/Application Support/Rumrunner/rules.toml, holds the two things you get to tell the router that it cannot work out on its own: which directories must never leave the Mac, and how far each tool is allowed to escalate. The daemon reads it once, when it starts.

The file

~/Library/Application Support/Rumrunner/rules.toml

fences = [
  "~/code/client-work",
  "/Volumes/Vault/contracts",
]

[apps]
continue = "auto"
aider = "local_near"
rr = "local_only"

Both keys are optional and the file itself is optional. With no file, nothing is fenced and every tool is auto. The example above is parsed by a test on every build, so what you paste is a file the daemon accepts.

After editing, restart the service so it reads the file again:

launchctl kickstart -k gui/$(id -u)/ai.rumrunner.rrd

A malformed file is fatal on purpose. If a value is misspelled, rrd refuses to start and writes the key name and what it expected to logs/rrd.err.log, because starting with a silently defaulted rule would send a prompt somewhere you did not ask for. A key it does not recognise is a warning in the same log and is ignored.

Fences

A fence is a directory. A request whose text mentions a path under a fenced directory takes the local lane, whatever the router would otherwise have scored it, whatever the per-app rule says, and whatever lane the request pinned. It is the first rule the router checks and nothing below it can override it. That is the one promise on this page that has an invariant number in the source (invariant 4).

What counts as mentioning

  • An absolute path anywhere in the messages: system, user, assistant and tool messages alike, since a tool result is where an agent pastes the file it just read.
  • A ~/ path, expanded to your home directory. Writing ~/code/client-work in the file means what you think it means; a literal directory called ~ would fence nothing, which is the one failure a fence must not have.
  • Symlinks are resolved on both sides before comparing, so a fence on the real directory catches a request that names the link.
  • A relative fragment such as client-work/src/main.py cannot be resolved, because the daemon is never told your editor's working directory. It is matched on the fence's last path component instead. That trips on a different directory that happens to share the name, and that is the intended reading of the rule: a false positive costs a slower answer, a false negative sends a client's code to someone else's machine.

What a fence does not do

It does not read your disk and it does not know what a file contains. It keys on paths in the request. If your editor sends the body of a fenced file without ever naming the file, nothing in the request marks it as fenced, and the router will score it like any other request. The editors on the editors page all name the files they send in normal use; an agent loop that inlines content silently is the case to think about, and the local_only rule below is the tool for it.

A fenced request goes local even when the local engine is down, and fails there. It is never rerouted to a hosted lane as a fallback.

rr why shows a fenced decision with the reason fence, glossed as “a fenced path was in the context, so this stayed on your Mac”. The fence paths themselves are counted, never printed, in rr status --report; a directory name can be the confidential part.

Per-app rules

Each entry under [apps] sets a ceiling for one tool. The key is the tool's identity as the daemon sees it; the value is one of three words.

ValueHighest lane allowedWhen you would set it
autofrontierThe default for any tool not listed. The router decides freely, subject to your stored keys.
local_nearnearshoreYou are fine with a hosted open-weight model on your own Together, Fireworks or Groq key, and never want a frontier bill from this tool.
local_onlylocalThis tool's traffic never leaves the machine, even when the local model cannot serve it well. The request is served locally or fails.

Which key names which tool

The daemon identifies a client by the X-RR-App header when it sends one, and by its raw User-Agent string otherwise. Continue sends continue and rr sends rr. aider sends the generic OpenAI/Python 2.20.0 unless you add the second file on the editors page, after which it sends aider. Cline and Zed send whatever their HTTP client sends; what the daemon actually saw is the app column in rr why, and that string, exactly, is the key to use.

A rule is a ceiling. A pinned lane (X-RR-Lane on the request) is honoured up to the ceiling; a pin above it is refused, and the refusal is named in the decision's reasons rather than silently ignored. A local pin means local: the router never escalates it. With no key stored for a lane, a rule that allows it changes nothing; the request cannot go where there is no key.

The thresholds behind “auto”

The shape rules the router applies when nothing above decided the lane live in config.toml, not here. The shipped values, which a test keeps identical to the Python reference router:

~/Library/Application Support/Rumrunner/config.toml

[router]
nearshore_prompt_tokens = 12000
frontier_context_tokens = 60000
agentic_message_floor = 3
pressure_threshold = "serious"

[privacy]
redact_secrets = true
telemetry_enabled = false

A prompt over nearshore_prompt_tokens goes nearshore. Three or more system or tool messages, or a request carrying tool definitions, reads as agentic and goes nearshore. Agentic and over frontier_context_tokens together goes frontier. Everything else stays local, and the lanes page has the full order.

When the Mac is hot or short of memory — at or past pressure_threshold, one of fair, serious or critical — a request that would have stayed local goes nearshore instead, if a nearshore key is stored. A local_only app stays local regardless, slowly.

Heat is read from macOS's thermal state. Memory is read from the kernel's memory-pressure level: its warn counts as fair, its critical as critical. A busy Mac sits at warn for hours without slowing down, so at the default serious it stays local and costs nothing; set fair if you want it to move.

Secrets in a request that leaves

With redact_secrets on, which it is by default, every payload bound for a hosted lane is scanned before it goes: AWS, GitHub and Stripe key shapes, the generic sk- and key= forms, and any 32-character-plus run that looks like entropy rather than words. A match is replaced with [REDACTED:type] and the decision log records the type and the count, never the value. Local requests are not scanned; there is nothing to protect them from.

The corpus that judges the scanner is a file a human owns, and a change to the patterns has to pass it with zero missed credentials. That is the standard, and it is the reason to keep the switch on: a redacted token in a prompt is a worse answer, a live token in a provider's logs is a rotation.