Skip to content

AI · A tool I built · Open source, interactive

rigswig: what your coding agent loads

rigswig reads every file your coding agent loads and shows what a session really gets, and what it costs before you type.

The question

A coding agent’s harness is everything around the model: instruction files, subagents, skills, commands, hooks, MCP servers, plugins, permissions and the model setting. They don’t live in one place. Your home folder, the repo, a local file, and whatever your organization manages.

Each tool decides in its own way which of those files wins: Anthropic’s docs set out Claude Code’s order, and OpenAI’s docs set out how Codex combines its files. I couldn’t see what a session in one of my repos actually got. So I built something that reads it.

The README for rigswig says it in one line: “See everything your coding agent loads before you type”, and where each piece came from. It’s one binary, written in Rust, under the Apache-2.0 licence. The code is on GitHub.

What loads before you type

The headline is one bar. It’s the context a session spends before your first message, split by kind, then by where each piece came from. Per rigswig’s README, it shows which scope decided each setting, what got overridden, and roughly how much context it costs.

Roughly, because no tokenizer runs. rigswig counts characters, divides by four and rounds up. The result is labelled an estimate, with a range of three to five characters per token.

It also says what it can’t see. The system prompt, the built-in tools and each MCP server’s tool list don’t come from a file it can read, so it names them as not measured.

The figure below is the project’s own invented demo setup. Not mine. Turn a layer or a kind off and the total moves as it would under rigswig’s what-if option, --without.

Figure 1: the context a session loads before you type

Instruction filesSubagentsSkills
Layers
Kinds
Tokens before you type
~11,692
Range
9,354 to 15,590
AGENTS.md's share
80.0%

One file is most of it. Turning off the agents in your home folder saves far less than trimming the repo’s AGENTS.md.

Invented: the acme-shop demo setup from rigswig’s own repo, as rigswig reported it for Claude Code. Tokens are rigswig’s estimate, characters divided by four.

Which file decided it

Set the same key in more than one place and, per Anthropic’s docs, Claude Code takes it from the highest level that sets it. The order runs managed settings, the command line, project local, shared project, then user.

Not everything works that way. Anthropic’s docs say list keys such as permissions.allow are combined across files. Environment variables, they say, aren’t a level at all.

rigswig keeps the trail for each setting: which layer set it, and which ones lost. An item overridden by one of the same name higher up gets marked that way. It isn’t counted twice.

Figure 2: which settings file wins in Claude Code

Highest first. Tick the files that set the model:

The session gets
model-e
Decided by
User

The highest level that sets the key wins, whatever the others say.

Invented values. The order is from Anthropic’s settings docs; list keys such as permissions.allow merge instead, and are not shown.

Two harnesses, one repo

The same repo can give two tools very different sessions. OpenAI’s docs say Codex stops adding instruction files once their combined size reaches a limit. The default is 32 KiB. They suggest raising it or splitting the files.

Anthropic’s docs say Claude Code reads AGENTS.md in only two cases: when there’s no CLAUDE.md in the working directory or above it, or when a CLAUDE.md imports it. The demo repo’s CLAUDE.md imports it.

rigswig compare puts both on one scale: one repo under two harnesses, or two repos. The README lists nine harnesses it models. Each gets a page of the rules it follows and where they came from.

Figure 3: how much of AGENTS.md Codex reads

37,422 bytes
Codex reads up to here: 32.0 KiB
Codex reads
32,768 bytes
Codex never sees
4,654 bytes
Claude Code, through the import
37,422 bytes

Past the limit, Codex never sees the end of the file. A setting raises the limit; splitting the file is the other fix the docs give.

Invented: the demo’s AGENTS.md is the starting size. The limit is Codex’s default from OpenAI’s docs; it counts bytes, which equal characters only for plain ASCII text.

From numbers to a to-do list

rigswig audit ranks what to trim. On the list: agents and skills in your home folder that nothing in the repo refers to, plugins the repo doesn’t call for, instruction files over budget, sentences repeated across layers, paths the instructions name that don’t exist, and permission rules that have piled up.

Each finding carries its evidence, the tokens it would save and a proposed change. Fleet mode runs across many repos and says which ones need each item, so the item can move out of your home folder. Into the repos that use it.

What it won’t do

The README for rigswig lists these as the point of the tool. No network request, unless you ask it to read a public GitHub repo. No model calls. Nothing written unless you start the page with --allow-writes.

It never prints the values in an MCP server’s environment or headers, and never reads session transcripts. Any folder you list as private, it refuses.

Its page listens only on your own machine, behind a random token. It loads nothing from anywhere else.

Install it

It’s on crates.io and on npm. Install from npm and you get the prebuilt binary for your platform. The releases page has downloads for macOS, Linux and Windows too, each with a checksum to check it against.

Latest: 0.1.2 · source on GitHub

With Cargo (crates.io)
cargo install rigswig
With npm, without installing
npx rigswig
With npm, installed
npm install -g rigswig
Then, in a repo
rigswig ui

Releases

Every release goes here, newest first, each with the notes from its GitHub release.

  1. v0.1.2Latest
    • Five more harnesses: Devin CLI, Cursor, Gemini CLI, DeepSeek Harness and DeepSeek-CLI.
    • rigswig status now reads nine harnesses, each with a page of the rules it models.
    • Config files with comments (JSONC) are read too.
  2. v0.1.1
    • On npm: npx rigswig installs the prebuilt binary for your platform.
    • On crates.io: cargo install rigswig.
    • No change to what rigswig reads or shows.
  3. v0.1.0
    • The first release: status, audit and the local page for Claude Code, Codex, Hermes Agent and Ollama.
    • Binaries for macOS, Linux and Windows, each with a SHA256SUMS line to check.
    • The JSON output may change in a minor release until 1.0.

Limits

It’s pre-1.0. The release notes say the JSON output may change in a minor release until 1.0. They also say the binaries aren’t signed or notarized yet.

The token counts are estimates from characters, not from the model’s tokenizer. Each adapter is rigswig’s reading of a maker’s docs. Docs change. Every adapter lists what it doesn’t model.

It isn’t the only tool on this question. The README credits the others: harness-map, whatloads, claude-config-auditor, and Claude Code’s own /context command.

Sources

  1. rigswig README. The project’s own README, main at commit 6c496fe; read 2026-11-06.

    What a harness is and what rigswig reads, the commands, the harnesses it models, the install lines, the guarantees, the audit, and the related tools it credits.

    • What a harness is, and the scopes
    • The tagline; a single binary in Rust; the licence
    • What rigswig shows for a repo
    • No model calls; everything is read from files
    • status --without layer:user
    • compare; the Harnesses table
    • rigswig audit and what it finds
    • Findings with savings and fixes; fleet mode
    • Guarantees: no network unless you ask, no model calls, read-only by default
    • Guarantees: no secrets, no transcripts, private folders
    • The page is local
    • Install lines
    • Related tools
  2. Claude Code docs Settings files and precedence. Anthropic’s documentation; read 2026-11-06.

    The order of the settings levels (managed, command line, project local, shared project, user); environment variables are not a level; list keys such as permissions.allow merge across files.

    • Settings precedence
    • Settings precedence, the five levels in order
    • Lists merge instead of overriding; environment variables are not a level
  3. Codex docs AGENTS.md. OpenAI’s documentation; read 2026-11-06.

    Codex stops adding instruction files once their combined size reaches project_doc_max_bytes, 32 KiB by default; raise it or split the files.

    • How Codex discovers and combines instruction files
    • project_doc_max_bytes, 32 KiB by default
  4. rigswig Roadmap. The project’s own docs/ROADMAP.md, main at commit 6c496fe; read 2026-11-06.

    The shared data model: layers, each item’s origin and what overrides it, the trail behind each setting, the list of what an adapter cannot see, and figures labelled by how they were got.

    • The page: the context budget as the headline
    • A required coverage.notModelled list
    • A decision trail for every resolved setting; effective and shadowedBy
    • coverage.notModelled
  5. rigswig The token estimate (rigswig-core, model.rs). The project’s source, estimate_tokens, main at commit 6c496fe; read 2026-11-06.

    Tokens as characters divided by four, rounded up, labelled an estimate, with a range of three to five characters per token.

    • estimate_tokens: chars / 4, low chars / 5, high chars / 3
    • A labelled estimate
  6. rigswig The demo setup (docs/demo/make-demo.sh). The project’s script that builds an invented setup for its screenshots; run with rigswig 0.1.2; read 2026-11-06.

    The invented home folder and the acme-shop repo the figures on this page read; the script says everything in it is made up.

    • The invented setup
    • acme-shop’s CLAUDE.md reads @AGENTS.md
  7. Claude Code docs How Claude remembers your project. Anthropic’s documentation, the AGENTS.md section; read 2026-11-06.

    When Claude Code reads AGENTS.md: without a CLAUDE.md in the working directory or above it, or through a CLAUDE.md that imports it.

    • The AGENTS.md table
  8. crates.io rigswig and rigswig-core. The registry’s version list; read 2026-11-06.

    Versions 0.1.0, 0.1.1 and 0.1.2 of both crates, published 2026-11-06.

    • The published versions
  9. npm rigswig. The registry’s version list; read 2026-11-06.

    Versions 0.1.0, 0.1.1 and 0.1.2, published 2026-11-06.

    • The published versions
  10. rigswig Releases. The project’s GitHub releases v0.1.0 to v0.1.2; read 2026-11-06.

    Each release’s date and notes, that the JSON may change in a minor release before 1.0, and that the binaries are not signed or notarized yet.

    • v0.1.0 to v0.1.2
    • v0.1.0: Before 1.0; not signed or notarized

rigswig is my project, so its README, roadmap and releases are its own description of itself. The Claude Code and Codex pages are each maker’s documentation of its own tool, read on the date shown; they change, and rigswig’s adapters follow them.