What Lagrange is good for
A page for those deciding whether to install Lagrange for themselves
or a team. For each part: what problem it solves, why that matters, and
what has already been measured. Numbers come only from local sources;
each one has its source and date. Where there is no number, it says "not
measured". Fresh metrics are in report.md (generated by
cc-report), the design is in architecture.md, commands and
keys are in guide.md.
Version at the time of writing: 3.2.1, measurement date: 2026-09-29.
In short
Lagrange is a workstation for AI CLIs on macOS: a terminal (Ghostty), a compact assistant and one shared window (projects, history, brief, stats, documentation, settings). It does not replace Claude Code. It removes the routine around it: wasted tokens, lost context, repeated explanations, accidental secret leaks and scattered windows.
| What | Number | Source, date |
|---|---|---|
| Install modules (enabled and disabled one by one) | 25 | install/modules.tsv, 2026-09-29 |
| Packages in the dependency manifest | 84 (licenses: MIT 15, Apache-2.0 7, BSD 3, GPL 2 mentions in the license column) | deps.tsv, 2026-09-29 |
| Skills / agents / hookify rules shipped | 6 / 5 / 3 | claude/skills, claude/agents,
claude/hookify, 2026-09-29 |
| Test suites and checks in them | 19 / 277 | docs/report.md (grep over
tests/), 2026-09-29 |
| Commits on the branch | 963 | git rev-list --count HEAD, 2026-09-29 |
| Agent branch merges in 30 days | 67 (clean 57, after a fix 10, abandoned 0) | docs/report.md, 2026-09-29 |
Lua lines in hammerspoon/ |
about 23.6 thousand | wc -l, 2026-09-29 |
1. Token savings
Problem. Your subscription limit is eaten not by
your questions but by overhead: test logs of thousands of lines,
npm install output, a long CLAUDE.md,
re-reading the same files, an expensive model on a simple lookup. The
longer the context, the faster the limit goes and the worse the
answers.
What was done and why.
cc-run-bgandcc-logtail. A long command runs in the background, the full log goes to disk, and the context gets a singlePASS|FAILline plus, on failure, a digest of up to 30 lines. Why: the model does not need 5000 lines of a successful log. Measured: summaries instead of full logs give 99.9% fewer characters across recorded runs (estimate at 4 bytes per token;docs/report.md, 2026-09-29).- The RTK hook. Compresses the output of common shell
commands. Measured by
rtk gain: 54.4% savings on covered commands (docs/report.md, 2026-09-29). Coverage is incomplete: perrtk discoverover 30 days, about 27% of 69 thousand Bash commands went through RTK (docs/dev/token-economy.md). That is whycc-bg-steersits next to it: a soft hint to run long things in the background; the hook's latency is about 13 ms (measured in the same place). lagrange-tokenshooks. Quiet output fornpm installanddocker build,git log -n 20, a Bash output limit of 15000 characters instead of the default 30000 (claude/settings.template.json). Their savings are written to a local log and visible in Stats; there is no separate total figure — not measured.- A short CLAUDE.md. The project template is 2298
bytes, the repository's own
CLAUDE.mdis 3026 bytes (wc -c, 2026-09-29). It is read in every session; the details are moved todocs/, which the model opens only when needed. - Cheap models for lookups. The
quickagent (haiku) for "where is the file, which version, container status",ops(sonnet) for diagnostics; decisions and prod stay with the main model. Actual distribution over a week perdocs/report.md: opus 80.1% of messages, sonnet 19.4%, haiku 0.4%. So cheap models are barely used so far; this is headroom, not ready savings. cchist recallinstead of repeated digging. Before studying code or a host, a similar past session is looked up in the local index (0 external API tokens). Search: 60.5 ms versus 83.9 ms in the first measurement (cc-bench,docs/report.md). How many tokens this saved you in particular — not measured.- Local answers without a model. Voice commands,
project choice by index (~25 ms) and
/airouting rules work with 0 tokens; only the ambiguous part goes to the model (~300–600 tokens;docs/dev/token-economy.md).
Summary by version. For 3.2.0 the release history in
docs/report.md records: tokens 57%, time 40%, sessions
right on the first try 68%. For 3.2.1 a measurement is under way (3 of 7
days), and the summary percentage is not published yet. Labels in the
report: MEASURED — from recorded data, ESTIMATE — a calculation with
assumptions.
More: dev/token-economy.md.
2. Skills and agents: fewer repeated prompts
Problem. The same requests ("daily report", "check the server", "new project", "move to a new tab") have to be explained from scratch every time.
What was done. Repeated work is packaged as skills
and agents: 6 skills are shipped (claude/skills: footprint,
handoff, lagrange, project-open, sched, search) and 5 agents
(history-researcher, ops, quick, repo-analyst, workspace-doctor). Why it
matters: a phrase replaces a paragraph of instructions, search and
diagnostics go to a separate context, and only the output returns to the
main conversation. Agents each work in their own worktree. How many
prompts this removed — not measured. An indirect indicator: 539 kit
actions were recorded over 7 days (cc-usage,
docs/report.md, 2026-09-29).
A separate page: customize.md.
3. Modularity
Problem. An "everything at once" set is heavy and unsafe: voice, the local model and web tools are not needed by everyone.
What was done.
install/modules.tsv— 25 modules (core, voice, stats, brief, local, tokens, roadmap, devops, codex, gemini, qwen and others). A disabled module is not linked, does not get intoinit.lua, and its packages fromdeps.tsvare not installed.~/.config/claude-cowork/modules.off— the list of disabled Lua modules; for themboot.loadreturns a quiet stub, and the menu and palette hide the windows. Enabling and rolling back is done from Settings orinstall.sh --with/--without.- Features live in separate
hammerspoon/directories, and the load order is set inload-order.txt. - Size limits (
bin/dev/cc-size,.sizecaps.tsv): code up to 800 lines, a test part up to 1000, files over the limit may only shrink. The largest right now: 697, 651 and 623 lines (cc-bench, 2026-09-29).
Why: less memory and fewer processes, and it is easier to understand
and update one part without touching the rest. Load on the Mac: 6
Lagrange processes, about 410 MB of RAM, 2.5% of the Mac's memory
(cc-footprint, 2026-09-29); disk 6.2 GB against a 5 GB
budget, so the budget is currently exceeded (same report).
4. History and search
Problem. "We solved this last week, but where?" AI CLI sessions sit in scattered files.
What was done. cchist builds a local
full-text index of all sessions and memory: search, recall,
a short session summary (show --brief), resume, and the
History window. Why: to search by the meaning of the task rather than by
file name; a past solution is suggested automatically. Content is not
sent over the network.
Numbers (cchist stats, 2026-09-29, counters only): 480
sessions in the archive in total, 339 in the last 14 days. Search in
cc-bench is 60.5 ms (weighted report) and 87.3 ms on the
last run on battery power; opening the History window takes 40.7 ms. The
project's own history doc is dev/history-search.md.
5. Windows and workspace
Problem. Projects, history, brief, stats and documentation are scattered across windows, and the terminal gets lost among them.
What was done. Three equal surfaces: Ghostty, a
compact assistant and one shared window. All entry points go through
workspace.open; sidebar 236 px, rail 44 px, toolbar 40 px.
Why: one place to switch, windows don't multiply, and context is kept
across updates. Hidden tabs release their WebKit process (about 40–120
MB) after 5 minutes (docs/system-map.md). Opening: palette
1.56 ms, Stats 49 ms, History 40.7 ms, panel 1.04 ms
(cc-bench --show, 2026-09-29, on battery, which is why
"Projects" showed 251 ms; on mains power it measured 22–27 ms,
docs/dev/perf.md).
6. Voice
Problem. A long task is easier to say than to type, and cloud speech recognition sends audio out.
What was done. Dictation and Live mode on a local
whisper-server; simple commands ("open project X") are recognized
without calling a model, that is, for 0 tokens. The voice reply style
keeps answers to 3–4 sentences so that they are not long when spoken.
The voice module is optional; without it, it takes no
memory (whisper_mb = 0 with the module disabled in
cc-bench). Recognition accuracy and STT speed are not given
in this document: not measured here, measurements are in dev/voice.md.
7. Board and roadmap
Problem. Plans live in chats and get lost; agents don't know what is next.
What was done. The source of tasks is Backlog.md in
backlog/: labels are modules, milestones are releases.
bin/cc-roadmap status|next shows the status and the next
task in one command; docs/roadmap.md is generated. Agents
write Backlog: TASK-N in the commit, and agent branches are
merged with checks: in 30 days 67 merges, 57 of them with no later
fixes, 10 after a fix, 0 abandoned (docs/report.md,
2026-09-29). Why: there is one plan, and the status is visible without a
retelling. Design: dev/roadmap.md.
8. Security
Problem. An AI agent with shell access can print a secret, run a destructive command on prod, or send something extra out.
What was done.
private-patterns. Personal check patterns live outside the repository (~/.config/claude-cowork/private-patterns); the tests read them, but they never reach public code.- gitleaks and a pre-commit check.
gitleaks git --stagedandcc-i18n scanare mandatory in the "Done" rule. There are no personal paths or data in the repository, by project rule. - hookify. Three rules in
claude/hookify: do not print secrets, forbid destructive prod commands, require a zone for prod. - Dry-run and rollback. Every update action is a
script that first shows a plan, has a rollback, and writes one line to
the
cc-logjournal. - Subscription only. AI CLIs work on a subscription or a free login; pay-per-token keys are forbidden by project rule.
- No telemetry. Self-diagnostics are written only
locally, Homebrew analytics are disabled, and tabs start with
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1(docs/dev/security.md). Every new external call of the installer is registered ininstall/network.tsv. - The session archive stays local and is never sent out.
Limitation: this is process protection, not a guarantee. Hookify
rules and patterns catch known patterns; the audit of the "Done" rule on
2026-09-29 found 3 mandatory fixes (FIX) and 9 remarks
(docs/report.md). The list of known issues: dev/security.md.
9. Local and open
Problem. Dependence on someone else's cloud and closed licenses gets in the way of rolling it out to a team.
What was done. Only OSI licenses (MIT, Apache-2.0,
BSD, GPL) and models with open permissive licenses; the reason for each
dependency is recorded in deps.tsv (84 packages). There are
no paid APIs, no accounts other than Claude Code itself, and no
telemetry. The history index, search, voice and the local model run on
your Mac. Limitation: the AI CLIs you use are themselves cloud services,
and their data is governed by their terms, not by Lagrange.
10. Speed and budgets
Problem. Helper utilities that slow down or heat up the Mac get switched off first.
What was done. There are budgets
(docs/system-map.md): the panel's idle CPU is under 1% when
hidden and at most 5% when visible, rendering takes no longer than 50
ms; windows have no timers while hidden. cc-bench checks
this and flags regressions, and REGRESS blocks the "done"
report.
Measured (docs/report.md, the first measurement and the
latest on mains power, 2026-09-29):
| Metric | Was | Now | Change |
|---|---|---|---|
ccwelcome_ms |
30.5 | 14.8 | −51.5% |
search_ms |
83.9 | 60.5 | −27.9% |
From docs/dev/perf.md (optimization measurements):
reopening a 3 MB document via mdview 1077 → 44 ms, a
summary of a large session 105 → 38 ms. The last
cc-bench --show run (2026-09-29, on battery in power-saving
mode) is ok: false: some metrics are worse because of
power, so only measurements on mains power are used for comparison (42
measurements on mains, 13 on battery). A full release check: 292 s
(docs/report.md).
What it gives to whom
- A regular user: less typing and explaining, history at hand, voice and one window, nothing unnecessary is installed.
- A team lead: predictable limit spending (there are Stats and a report), security rules in code rather than in people's memory, open licenses, a rollback for every change, and it works without your own servers.
What is not measured
- Total token savings from the
lagrange-tokenshooks and fromcc-logtail(the log is only accumulating). - Token savings from
cchist recallfor a particular user. - How many prompts skills and agents remove.
- Accuracy and latency of voice input within this document.
- The share of sessions "right on the first try", the weekly share of savings and "capabilities in use" — a seven-day measurement is under way (3 and 0 of 7 days as of 2026-09-29).