Narrowbit

A coding agent that sends
only what the model needs

Narrowbit runs on your Mac, works with the model you already pay for, and keeps a local log of everything it does, so each step sees the smallest useful slice of your code.

Early: version 0.1, macOS
git clone https://github.com/sanjuraw/narrowbit.git ~/Narrowbit && ~/Narrowbit/scripts/install.sh

The installer asks before installing anything. Then: narrowbit ui for the app, or narrowbit agent "fix the failing test".

How it works

The measure is correct coding work per unit of AI usage, not fewer tokens for their own sake. If quality drops, Narrowbit has failed.

Bring your own model

Claude or Codex through your existing subscription, or any OpenAI-compatible API: DeepSeek, OpenRouter, Gemini, Groq, Ollama, LM Studio and others.

Small context, every step

A local index and a durable task log let each turn carry only what the next action needs, instead of the whole conversation so far.

Checked, not claimed

"Done" is tested against your repository's own typecheck, lint and test commands before the agent is allowed to stop.

You stay in control

Commands ask first (or only the checks run without asking), edits show as diffs, every step can be rewound, and nothing is committed until you say so.

Local-first

No telemetry and no repository upload. Code goes only to the model provider you choose. Known secret patterns are redacted from what the agent stores (best effort).

App and terminal

A native Mac app with live progress, plus a CLI and an MCP server. Skills for common jobs and connectors for MCP tools such as GitHub.

Narrowbit Memory

Project memory for any coding agent. It keeps what isn't in the code: a decision and its reason, a constraint, a convention, an approach that already failed. It ships inside Narrowbit and also works on its own with Claude Code, Codex or any agent that speaks MCP.

Plain Markdown files

One note per file in the project, readable and editable by hand, or opened as an Obsidian vault. Kept out of git.

Knows when a note may be stale

A note about a file remembers that file's state; if the file has changed since, recall says so instead of presenting it as current.

Local, no model calls

Nothing is sent anywhere or summarised by an AI. Notes are found by keyword and file, with secrets scrubbed before saving.

claude mcp add narrowbit-memory -- node ~/Narrowbit/packages/memory/bin/narrowbit-memory.js serve

narrowbit-memory on GitHub

Results, with their limits

Each result names its baseline and how much it rests on. Tasks are real fixes from a project's history: start at the commit before the fix with its tests added, and succeed when those tests pass without touching them.

Hono · 40 tasks · SonnetNative Claude CodeNarrowbit
Tasks solved40 / 4040 / 40
Cost for all 40$3.48$1.43 (−59%)
Uncached input per task (median)baseline−61%
Turns per task7.15.2
Task time (median)16 s19 s (slower)
Task time (slowest 10%)28 s28 s

Also measured

  • Codex (gpt-6-sol), same 40 tasks: 40/40.
  • DeepSeek V4.1 Flash, direct API: 39/40, about $0.22 for all 40 at list prices.
  • Python (click), 43 tasks against native Claude Code: 43/43 both, 39% lower cost, but slower (median 36 s vs 25 s).

What did not work

  • Mixing a cheap model for reading with an expensive one for editing lost to one good model doing the whole task, both times measured.
  • Project memory notes showed no reliable token saving on single-file fixes.
  • Narrowbit is not faster than native Claude Code: it matches it at best, and on Python it is about 1.4× slower.

Every run, including the approaches that failed, is written up in the project history. The benchmark kit is in the repository, so you can run it on your own code.

Known limits

  • macOS only for the app; the CLI needs Node 22.13 or newer.
  • Measured on two repositories (TypeScript and Python), one try per task; other languages and project sizes are not yet shown.
  • The agent edits real files and runs your project's own commands. Review the diff before you commit.
  • Files the agent reads can contain instructions aimed at it. Don't run it with commands allowed on code you don't trust.
  • An archive unpacked over an existing project can bring Narrowbit state that is used without asking. See SECURITY.md.