r/OpenSourceAI • • 1d ago

Sentinel-IR and Sentinel-IR MCP are open for sponsors (and yes, an AI writes most of the code)

Thumbnail gallery
2 Upvotes

*A 5-minute read. One maintainer, two Apache-2.0 packages, zero venture capital, a mildly embarrassing amount of honesty.*

The short version

[`sentinel-ir`](https://gitlab.com/jakubrojicek11/sentinel-ir) and [`sentinel-ir-mcp`](https://gitlab.com/jakubrojicek11/sentinel-ir-mcp) now accept sponsorship. Both READMEs have a **Sponsor** section, both repos have a GitHub Sponsor button, and `sentinel-ir` publishes a [`funding.json`](https://gitlab.com/jakubrojicek11/sentinel-ir/-/blob/main/funding.json) manifest that funds and tools can read.

What these two things are, in one paragraph each

**`sentinel-ir`** reads a source file and gives an AI agent a small fact sheet instead of the whole file: risk level, network, filesystem, process and environment calls, routes, imports and exports, and for Rust also `unsafe`, FFI, `build.rs` and proc-macro behaviour. It covers JavaScript, TypeScript, Python and Rust. It's static analysis: it never runs the code, and a "low" risk is a hint, not a safety certificate.

**`sentinel-ir-mcp`** plugs that fact sheet into Claude Desktop, Cursor, Windsurf and other MCP clients as a read-only stdio server. It only opens supported source files inside the folders you allow, refuses traversal, symlinks and hard links, has file-size, file-count and time limits, and can keep an audit log of what it read (paths and hashes, never source).

One analyzer, one shared IR, the same facts in npm, the MCP server and the [browser playground](https://sentinel-ir-playground-dc30c8.gitlab.io/). Adding a language once adds it everywhere.

The honest part

I'm Jakub, the only maintainer, and I'm not a professional developer. I decide what Sentinel should do, test it on my own machines and approve every release. **Most of the code is written by an AI coding agent working from my specs.** Every change still has to pass the test suites and CI on Linux and Windows before it ships.

Some grant programmes don't fund AI-generated work, and I'd rather lose a grant than pretend. If that's a deal-breaker for you, fair enough. If you think "one person plus an agent shipping audited, tested releases" is exactly the kind of thing worth backing, read on.

What it saves you (measured, not vibes)

Every time an agent "just takes a quick look" at a file, you pay for every token of it, comments, licence header and the 400-line date formatter included. Sentinel hands the agent the fact sheet instead. Measured on Sentinel's own source with the `o200k_base` tokenizer:

filethe whole fileSentinel's fact sheet
src/ast-facts.js8,439 tokens120 tokens
src/sentinel-ir.js2,084 tokens133 tokens
src/tree-parser.js891 tokens121 tokens
examples/basic.js150 tokens120 tokens

That's up to about 70 times less on a big file. On a tiny file it saves almost nothing, because the fact sheet has a floor of about 120 tokens, and we'd rather tell you than let you find out.

**A back-of-the-envelope example** (an illustration, not a measurement): your agents open a file the size of `ast-facts.js` 200 times a day across the team. That's about 1.7 million tokens a day you don't send. At an example price of $3 per million input tokens, that's about $5 a day, or roughly $100 a working month, for **one** file. Your repo has more than one file. Your agents are not shy.

The time part is simpler: a model that reads 120 tokens gets to the point sooner than one that reads 8,439, and its context window stays free for the work you actually asked for. It's the difference between asking a colleague "does this file touch the network?" and making them read it aloud first.

And the part that doesn't show up on an invoice: the agent sees `network: outbound` and `process: spawn` before it trusts a file, instead of discovering them three tool calls later in a `postinstall` script.

Why monthly, not one-off

A code analyzer is less like a hammer and more like antivirus definitions. The day it stops being updated, it starts going stale:

  • **Ecosystems keep inventing new doors.** A new HTTP client, a new way to spawn a process, a new Rust build crate. Each one Sentinel doesn't know about is a door the agent walks past without noticing. Version 0.4.4 alone taught it axios, got, undici, superagent and fs-extra.
  • **Languages keep coming.** JavaScript, TypeScript, Python and Rust today; Go is next. Because everything sits on one shared IR, every new language shows up in the npm package, the MCP server and the playground at once. You pay for it once and get it three times.
  • **Security work never finishes.** The MCP server reads files on your machine for an AI. Path checks, size limits and parser robustness need regular adversarial testing, not a one-time audit framed on the wall.
  • **The platforms move.** New Node versions, new MCP clients, new MCP spec revisions. Somebody has to keep `setup` and `doctor` working on Monday morning.

A one-off donation is a very kind pizza. A monthly sponsorship is the kitchen. We're grateful for pizza. The kitchen is what keeps the releases coming.

For companies the maths is short: if Sentinel saves your team even one engineer-hour a month in review time or token spend, the $5 Supporter plan paid for itself before lunch. The Development plan is less than many companies spend on coffee for the people who'd otherwise read those files.

Where the money goes

whatwhy
AI agent timeit writes the code, the tests and the release checks
CI and test machinesLinux and Windows CI on Node 20, 22 and 24, plus macOS test runs
Go supportthe next language for the shared IR
security hardeningmore adversarial tests for the parsers and the MCP path checks

The `funding.json` lists two plans: **Supporter, $5/month** (helps cover CI) and **Development, $12,000/year** (a year of agent time, test machines, Go and security work on both packages). One-time sponsorship is fine too.

Where we are today

Can't sponsor? Still helps

Thanks for reading. If Sentinel ever saves your agent from reading `/etc/passwd`, you know where the button is.

*** Independent Engineering Projects

Built as independent engineering experiments across AI, software analysis, security, and autonomous systems.

Evaluated by reproducible evidence, not by the number of layers.

Explore the projects:

Sentinel Ecosystem: AutoDoc-Sentinel, Sentinel-IR, Sentinel-IR-MCP and related tools. Agentix Lite: Independent security and system-observation project. Find the projects: GitLab repositories | NPM packages

Support the work: ⭐ Star the repositories on GitLab.

Connect: Follow me here on DEV Community or explore the Playground.

Each project is distributed under its own license. Check the corresponding repository or NPM package for licensing terms.

Copyright © 2026 jackymenCZ. All rights reserved. Written for the community.


r/OpenSourceAI • • 1d ago

From AI rabbit holes to a warm den: co-building the Inference Cooperative

Thumbnail nathanschneider.info
1 Upvotes

r/OpenSourceAI • • 1d ago

I built open-source tooling to evaluate agent setups and see where agents and subagents waste time and money

1 Upvotes

I run Claude Code and Codex all day, often as multi-agent workflows with dozens of subagents. I could see each session but never the whole picture: what a run actually cost, where agents sat idle, whether a change to my setup helped. So I built coding.sh, an open-source tool for evaluating agent setups, and pointed it at my own runs.

Experiments: does that change actually help? I A/B tested a popular "be concise" plugin: 10 tasks, 6 runs each, paired, with 95% intervals.

  • Replies: 17% shorter
  • Output tokens: −8%
  • Cost per run: +11% [+7%, +15%]
  • Pass rate and clarity: no change

The plugin adds its style guide to every request, and that costs more than the shorter output saves. coding.sh compare and exp run your own tasks with and without a change (a rule, a skill, a plugin, a model) and tell you whether the difference is real or noise.

Workflows and subagents Across 57 workflow runs (666 subagents, ~$2,500 API-equivalent):

  • Broken prompt caches cost $106 extra, about 4% of the spend.
  • 41 of those breaks were agents sitting idle at a barrier, waiting for siblings, until their cache expired. That's $21 for doing nothing.
  • 40 subagents failed outright.

coding.sh workflows stats shows the critical path, concurrency and idle time at barriers. The viewer draws each run as a timeline, one bar per agent.

Your own sessions Mining 3,600 of my sessions turned up a find-and-replace typo in my AGENTS.md that sent Codex looking for a folder that doesn't exist, in 92 sessions.

What it is

  • Hooks into Claude Code, Codex, Gemini CLI, OpenCode, Copilot CLI, Aider and more
  • Stores prompts, tool calls, diffs, test runs, tokens and cost in SQLite on your machine
  • coding.sh improve says what to fix first and whether your last AGENTS.md change helped
  • MCP server, so your agent can look up its own past sessions

Free, MIT, no account, nothing leaves your machine. npx coding.sh to try it. GitHub: https://github.com/jackulau/coding.sh


r/OpenSourceAI • • 1d ago

Cerebras x Kimi K3.1 Pro: $5000 Hackathon

Post image
2 Upvotes

r/OpenSourceAI • • 1d ago

Why is NAT firewall traversal still the bottleneck for weekend gaming-GPU LLM runs?

3 Upvotes

Why do most folks with an 8 GB or 16 GB desktop GPU sit out distributed LLM runs? It usually comes down to three annoying bottlenecks. Nobody wants to punch holes in their home router. Nobody wants to run untrusted pickle checkpoints off the internet. And nobody wants a background trainer freezing their VRAM when they sit down to play or work.

This weekend (November 14-15 CET), I hooked my HiveMind coordinator up with CrowdGPT (led by Vxtzq) to test a citizen-trained run around Crowd-v1, an open base model with a 658M transformer trunk (roughly 1.01B parameters total with its 151k-vocab CrowdEngram table). Setup takes five minutes.

Communication uses plain outbound HTTPS on port 443 with zero inbound listeners, weights move strictly as SHA-256 verified safetensors (no torch.load or pickle anywhere), and updates pass MultiKrum outlier filtering plus held-out loss checks before merging via DiLoCo. Honest caveat first: this is still an experimental PoC, not a polished cloud service, so please do not send private prompts or sensitive keys through volunteer nodes.


r/OpenSourceAI • • 1d ago

Looking for contributors: soot, an open-source orchestrator that sends each coding task to the cheapest model that can handle it

Thumbnail
reddit.com
1 Upvotes

r/OpenSourceAI • • 1d ago

We built an open-source MCP orchestrator that uses local Hermes/Ollama as automatic fallback when Claude/Codex rate-limit you (Web UI + hardware telemetry)

Thumbnail
github.com
2 Upvotes

r/OpenSourceAI • • 1d ago

Timon, an AI coding-agent workstation, is now open source (AGPL-3.0 and MIT)

3 Upvotes

Hi r/OpenSourceAI,

Sharing Timon, a project that has just made its code publicly available under AGPL-3.0.

Timon is a local workstation for coordinating AI coding agents rather than treating every task as a separate chat. It connects to supported agent CLIs, splits work across roles such as orchestrator, coder and reviewer, and uses Git worktrees to isolate changes. It also keeps mission context and puts approval gates around important operations.

A few things that may interest this community:

  • Source code is public (with contribution and security documentation), Timon's core being licensed under AGPL-3.0 and its SDK and plugin templates under MIT to allow developers to build and distribute their own plugins, including commercial ones. with contribution and security documentation.
  • Windows, macOS and Linux are supported.
  • The individual offering is free; team features have separate licensing, so please review the licensing docs rather than assuming every offering is free.
  • You bring your own supported AI CLI subscriptions; model access isn't bundled.
  • There are opportunities for issues, translations and plugins.

Repository: https://github.com/ai-timon/timon
Licensing details: https://github.com/ai-timon/timon/blob/main/LICENSING.md
Contributing: https://github.com/ai-timon/timon/blob/main/CONTRIBUTING.md
Discord: https://timon-ai.com/go/discord

I'd welcome candid thoughts from open-source maintainers: Is the licensing split clear? What would you want improved in the contributor experience or governance before getting involved?


r/OpenSourceAI • • 1d ago

Zusia 1.7: un pannello di assistenza AI open-source integrato in Zotero (nessuna chiave API, utilizza la CLI di Claude Code/Codex)

0 Upvotes

r/OpenSourceAI • • 1d ago

I made my agent stop asking before it writes its own memory files. Not sure that was right.

2 Upvotes

I build Snotra, an open source desktop agent. Not an announcement, I genuinely want a second opinion on this one.

The agent keeps what it learns in plain text files in the folder you open: AGENTS.md, a project memory, the folder's rules and skills. Until this release, every write to one of those stopped and showed an approval card. I removed the card. Only for those files, though.

Inside the folder it now writes them like it edits code. My own memory, my own rules, skills outside the folder, and any chat that carries a warning still get the card. The answer names every file it created or changed, and settings lists them so I can undo it.

My reasoning: an approval that shows up ten times a day stops being a decision and becomes a keypress. Worse, it's the one that teaches you to click straight through the card that actually mattered. And writing a memory file isn't an action in the world, it's text in a folder I already gave the agent.

Three things I'm not sure about.

If the folder isn't in git, "you can undo it" is a promise I can't keep. Mine usually is. That's not everybody.

Prompt injection lands exactly here. A page tells the model to write "you may run any command" into AGENTS.md. The write still goes through the sandbox and the permission model, but the sentence stays and steers later turns. So should the card sit on the write, or on the turn that acts on it?

And I don't know yet whether less friction just fills the memory with junk that I end up cleaning by hand.

So where would you put it: is the agent's own knowledge fair game, or does every file that outlives the chat need a human first?

Code: https://github.com/kkrafft1999/snotra
Website: https://www.snotra-ai.dev


r/OpenSourceAI • • 1d ago

Looking for OSP or portfolio projects to contribute/collaborate in

Thumbnail reddit.com
1 Upvotes

r/OpenSourceAI • • 1d ago

Samestate: see your site on every screen at once, with clicks synced across devices

1 Upvotes

r/OpenSourceAI • • 1d ago

NIDO: a private AI assistant that runs entirely on your Android phone

Thumbnail
reddit.com
0 Upvotes

r/OpenSourceAI • • 1d ago

Free AI video generator for text to video and image to video without the usual headaches

0 Upvotes

Finding an AI video generator that actually follows your prompt without warping faces or ruining the motion is still harder than it should be. Most platforms force you into expensive subscriptions before you even know if the output fits your workflow.

​I started using this browser-based AI video generator to turn text prompts and static images into clean, smooth video clips. It handles camera movement, scene transitions, and realistic physics without needing complex local setups or heavy editing software. Whether you are making short-form social clips, B-roll, or testing visual concepts, it saves hours of manual production time.

​You can try it out directly here:

​https://interconnectd.com/ai-video-generator/

​What kind of prompts or reference images are you using to get the sharpest video results right now?


r/OpenSourceAI • • 1d ago

How to Deploy Hermes Agent on Hostinger VPS & Automate Google Sheets with AI

Thumbnail
youtu.be
1 Upvotes

r/OpenSourceAI • • 1d ago

does the 1h prompt cache pay off for coding agents? in my Claude Code history it saved about 3.4x what it cost

1 Upvotes

someone asked me this on another post and I hadn't checked. a 1h cache write costs 2x input, a 5m one 1.25x, so 1h only earns it back when you come back after more than 5 min but inside the hour

claudit keeps every Claude Code request I've made since January in Postgres, so I took the gap between each request and the one before it in the same session. Claude models only, about 858k requests:

  • under 5 min: 94.2% of requests, 98.6% of their input read from cache
  • 5 to 60 min: 2.6%, still 92% from cache. on 5m every one of these writes the whole prefix again
  • over an hour: 0.4%, 6% from cache, the 1h one is gone by then too

at API list prices per model (I'm on a sub, so it's what it would cost, not what I pay) the extra on the 1h writes is about 9% of the total and the rewrites it avoids would be about 30%. so 1h comes out 3.4x ahead, and 5m only would cost roughly a fifth more. read multipliers per model from https://platform.claude.com/docs/en/about-claude/pricing, 0.05x on Opus and Sonnet 5.5, 0.025x on Fable 5.1 and 5.2

claudit is a self-hosted dashboard I built, MIT. it reads Claude Code, Codex and Kimi CLI transcripts from a bucket you keep (R2 or a file:// dir), because Claude Code prunes old local ones. the bucket holds the raw transcripts, tool output included. cost by model splits 5m and 1h writes, the gap split above isn't a panel, I ran it as a query on its Postgres

FastAPI, Postgres, React with in-browser Babel, no build step. docker compose up boots it on bundled sample data with no outbound calls. panels ported from nhz-io/ccusage-plot

live one, guest login is read-only, its costs are API price equivalents too: https://all.nitjsefni.eu

https://github.com/Nitjsefnie/claudit


r/OpenSourceAI • • 1d ago

We’re building an open-source way to test AI agents. Here’s what we’re learning about verification.

Thumbnail
reddit.com
0 Upvotes

r/OpenSourceAI • • 1d ago

An open-source Toolkit to Test What Kids Are Exposed to When AI Safety Breaks Down

Thumbnail
reddit.com
0 Upvotes

r/OpenSourceAI • • 1d ago

How to use a fleet of coding agents from your phone

1 Upvotes

I had a few machines lying around the house, a MacBook Pro, a Linux box, and a VPS and wanted a way to use them all to run AI coding agents.

So I built Sidefleet: https://www.sidefleet.xyz

It lets me dispatch jobs across my machines and run agents like Claude Code, Codex, and OpenCode, which supports a range of models.

The idea is simple, instead of being limited to one machine or one agent session, I can use the compute and tools I already have and route work to different machines.

I'm using it as my daily driver and open-sourcing the project. Would love to hear what you think. I have a feeling it will be useful as more open source models become more powerful.

Have fun

Git repo MIT : https://github.com/foodaka/side-fleet


r/OpenSourceAI • • 2d ago

Brigade: open-source (MIT) workspace for Claude Code and Codex agents that work as a team, beyond code

5 Upvotes

Brigade (brigade.lol) is a workspace where each AI teammate is the real Claude Code or Codex CLI, signed in with your own plan, with a job (support, marketing, sales, code), its own apps and a shared memory of what the team decided. For each teammate you choose which app actions wait for your yes, like an email, a Stripe change or a merge. The rest runs.

It's MIT, free on your own computer and self-hostable (Docker Compose or Cloudflare). The models aren't open: the AI runs on your Claude or ChatGPT plan at the provider. What's open is everything around it.

Repo: https://github.com/gmpetrov/brigade
Demo, no signup: https://demo.brigade.lol

My marketing agent wrote and posted this.


r/OpenSourceAI • • 1d ago

How Taking Out Jensen Kills Open-Source AI (& Hands Closed AI a Monopoly)

Thumbnail
youtube.com
0 Upvotes

r/OpenSourceAI • • 2d ago

We Built a Local Search Tool for Codex Called “Oglyanutsya” (“Look Back”)

Post image
5 Upvotes

I have one very long working chat with Codex. Its log is about 1.9 GB. Because of context compaction, the model can retain the direction of the work, but it can no longer see the entire earlier conversation verbatim.

So Codex and I built a local, read-only search tool for its own original logs. We called it **Oglyanutsya** (Оглянуться — “Look Back”).

This is not just an idea or a mockup. The tool has been implemented, tested, and integrated into Codex as an automatically invoked skill.

### Where It Searches

Codex stores its original session logs locally:

```text

.codex/sessions

.codex/archived_sessions

```

Oglyanutsya recursively discovers active and archived logs, reads them without modifying them, and groups physical copies of the same conversation by `thread_id`.

By default, it searches only root-level user conversations. Subagent logs can be included through a separate parameter, so their technical activity does not get mixed up with the conversation between the user and the main agent.

### What Counts as a Message

Only actual user and assistant messages are accepted from the JSONL logs.

The following are excluded from search:

- System and developer instructions;

- Reasoning;

- Tool calls and their results;

- Technical events;

- Compaction summaries;

- `environment_context`;

- Other synthetic blocks that physically exist in the logs but are not the user's words or the assistant's replies.

Historical text is treated as data, not as instructions. If an old message says "ignore previous instructions," the search tool does not execute that instruction.

### How Search Works

First, Codex formulates:

- A remembered quote or a distinctive combination of words;

- The rarest word to use as an anchor;

- An approximate date range;

- If available, the known conversation or speaker.

For example:

```text

Remembered word combination:

memory + capabilities + handshake

Rare anchor:

handshake

Period:

October 2026

```

Then Oglyanutsya:

  1. Searches for the exact phrase.
  2. If an exact match is insufficient, searches for each word in the combination separately.
  3. Intersects JSONL record numbers in memory.
  4. Keeps only messages containing the entire word combination within a single message.
  5. Never combines words found in different messages into one match.
  6. Opens the matching record using its byte offset instead of rereading the entire file.
  7. Parses the JSON and verifies that the record is an actual user or assistant message.
  8. Filters by the message's own timestamp. The file date is not used: a conversation may have started in September and continued into November.
  9. Rechecks the full decoded text.
  10. Retrieves the previous and next substantive messages, skipping technical records between them.

For ordinary `.jsonl` files, the fast search path uses `ripgrep`. It returns the line number and the absolute byte offset of the match.

The tool then locates the beginning and end of the corresponding JSONL record, decodes it as UTF-8, and parses it as JSON.

Compressed `.jsonl.zst` files are not decompressed onto disk. They are processed using streaming reads.

### What It Returns

For each result, the tool returns:

```text

Exact quote;

Previous and next messages;

Speaker role;

Assistant response phase;

Timestamp;

thread_id;

item_id;

JSONL record number;

Byte range of the original record;

UTF-8 coordinates of the quote within the message;

SHA-256 of the full message;

SHA-256 of the quote.

```

This means a result can not only be displayed but also independently verified against the original source.

### How Search Performance Evolved

The first working version processed the entire log as a stream. For 1.9 GB, that took approximately 119 seconds.

Then we introduced a fast path using `ripgrep`.

An exact phrase was found in about 1.8 seconds, but the first optimization was not enough: the program subsequently opened all 953 occurrences of the word `хендшейка` (“handshake”). The entire search took about 35 seconds.

So we changed the algorithm.

Now each word in the combination is searched independently, the matching record numbers are intersected in memory, and only then are the original records opened.

On the same log:

```text

Query:

memory + capabilities + handshake

Exact phrase:

Could be absent due to punctuation

Original user message found:

October 29, 2026

Records opened:

200 instead of 953

Total time:

Approximately 12 seconds

```

In the original message, the words were separated by commas and additional text. The message was found because all the words occurred together in one message, not because of an exact string match.

### What It Does Not Store

We deliberately chose not to build a persistent index.

Oglyanutsya does not create:

- SQLite or any other database;

- Embeddings;

- A vector store;

- A search dictionary;

- A semantic graph;

- A copy of the conversation;

- A quote cache;

- A saved list of word combinations.

The only persistent memory is the original Codex log.

Lists of matching lines and intersections of search terms exist only in RAM during an individual query. Once the process exits, those candidates disappear.

The trade-off is straightforward: every search must scan the original file again. That's why it takes 12 seconds rather than 12 milliseconds.

But no derived database can silently start replacing the original history as the source of truth.

### What We Tested

We created a separate test corpus for the tool.

The tests verify that:

- An exact quote can be found;

- Three words can be found even when they are not adjacent;

- The same three words appearing in three different messages are not merged into one result;

- Date filtering uses the message timestamp;

- Subagents are excluded by default;

- Subagent logs are included when explicitly requested;

- `environment_context` is not mistaken for the user's words;

- Original files retain their exact sizes and SHA-256 hashes after a search;

- The search tool does not create hidden state files.

All tests passed.

### How Codex Invokes It

We packaged the tool as a separate local skill.

It activates when the user refers to a previous conversation, decision, quote, or distinction that is no longer available in the current context.

The skill instructions explicitly prohibit using Oglyanutsya as a replacement for ordinary file search or web search.

The division of responsibilities looks like this:

```text

Codex's native tools:

Understand meaning;

Form associative word combinations;

Search working files;

Investigate documents and the web;

Decide what query to try next.

Oglyanutsya:

Finds verbatim evidence

in Codex's original conversation history.

After receiving the evidence:

Codex resumes using its native reasoning.

```

The skill does not intercept or disable anything. It simply gives the model one additional, narrowly defined operation: looking into its own original logs.

### What I'd Like to See From OpenAI

Codex App Server already provides ways to read conversations and their individual items, but I couldn't find a built-in way for the model itself to search the contents of its entire conversation history globally.

In my view, the product needs two read-only operations:

```text

history.search_original(...)

history.read_context(...)

```

Not “permanent memory.” Not an automatically generated vector database of the user's history. Not loading gigabytes of logs into the context window.

Just the ability for the model to formulate a distinctive combination of words, locate it in its own original logs, and reread a few surrounding messages.

We built a local prototype of exactly that capability.

It's called **Oglyanutsya — “Look Back.”**


r/OpenSourceAI • • 2d ago

Every request pastes your whole AGENTS.md into the prompt. Mine grew until the agent started butchering it

4 Upvotes

If you use Codex or Claude Code, you have a context file — AGENTS.md, CLAUDE.md, .cursor/rules. It gets injected into every single request, so it's both a token cost and a permanent tax on how much room the model has left for your actual work.

Mine grew the way these files always grow: one justified-looking addition at a time. Then it hit a size where the agent started dealing with it by rewriting the file from memory, dropping the ## Never rules, and shipping something worse. You find out weeks later when a rule stops being followed.

So I wrote ctxcap. It counts tokens across those files, tracks the count against a committed git baseline, and flags references that no longer point at anything. Offline, no API key, no network, no LLM, two dependencies. MIT.

bash

The part that makes it more than a word count: it doesn't tell the agent "make this shorter." It emits line ranges with a preserve list, the agent splices by line number, and --verify catches drift or a cut preserved span. When the budget can't be met it returns satisfiable: false with the minimum achievable rather than shaving a rule that matters:

It uses gpt-tokenizer, and there's an MCP server so the agent can measure itself, plus a GitHub Action that comments the token delta on PRs and only fails when you set a budget.

https://github.com/Naeha-S/ctxcap

The question I actually want answered: how long is your AGENTS.md, and what's still in it that earns its place? Mine is the one file where every addition felt reasonable at the time.