Solutions/Claude Code plugin

Spend Claude's context on reasoning. Not raw bytes.

Lineman runs a cheap second model as a compressor, filter and classifier. It chews through the data-heavy bytes - big files, build logs, search dumps - and hands Claude a small, structured summary. The swap happens automatically, before the tool result ever reaches Claude. You change nothing about how you work.

Read(app/services/billing.ts)4,402tokens · 84 ln-48%
1import { Stripe } from 'stripe';
2import { Logger } from '../core/logger';
3import { Invoice, LineItem } from './types';
4// Handles metered usage + invoice reconciliation
5export class BillingService {
6 private stripe: Stripe;
7 private log = new Logger('billing');
8 private cache = new Map();
9
10 constructor(key: string) {
11 this.stripe = new Stripe(key);
12 }
13
14 async createInvoice(customerId: string): Promise<Invoice> {
15 const items = await this.collectUsage(customerId);
16 if (!items.length) throw new Error('no usage');
17 return this.stripe.invoices.create({ customer: customerId });
18 }
19
20 async reconcile(invoiceId: string) {
21 const inv = await this.stripe.invoices.retrieve(invoiceId);
22 this.log.info(`reconciled ${inv.id}`);
23 // ... 130 more lines: refunds, proration, webhooks
24 }
25}
Structural map · billing.ts
classBillingService L5-168ctor(key: string) L10methodcreateInvoice(customerId) L14methodreconcile(invoiceId) L20depsstripe · Logger · Map cache
9 lines instead of 172 - Claude gets the shape of the file for free, locally. Need a body? read_file_full is one call away.
Raw outputLineman summary
Drag to compress the result
How it works

A plugin on your machine. A cheap model in the cloud.

Lineman sits on the wire between Claude Code and its tools. The swap is automatic and invisible - you keep working exactly as you do today.

01on your machine

Claude fires a tool

A native Read, Bash or Grep runs as usual. A Lineman hook catches the result the instant it returns - before Claude ever sees it.

02to the cloud →

The raw bytes hand off

The bulky output is streamed over TLS to a cheap secondary model. None of it touches your expensive Claude context.

03in the cloud

A cheap model does the byte-work

It reads the noise for you - classifying, filtering, summarising - and keeps only what is relevant to the task at hand.

04→ back to Claude

A small summary returns

A compact, structured result lands back in Claude Code. Your context window only ever spends tokens on the signal.

Raw tool output~120 KB
What Claude sees~4 KB
96% smallerEnd-to-end TLS · tool output is never persisted beyond the request.
The core method

Claude never chooses to use Lineman. It just gets the smaller result.

Hooks intercept Claude Code's native tools and replace the bulky result with a compressed summary - before it ever reaches the model. Everything else on this page hangs off this one move.

Read

File reads

Large reads are swapped for a summary or a structural map - not every line dumped into context.

172 ln9 ln
Bash

Command output

Build runs, installs and logs are compressed down to their key findings.

2,400 ln14 ln
Grep

Search results

Hits are re-ranked by relevance and trimmed instead of returned raw.

80 hits6 hits
Glob

File listings

Long globs are grouped and condensed into a structure you can scan.

900 pathsgrouped
WebFetch

Web pages

A fetched URL is reduced to the part that's actually relevant to the task.

full pagethe answer
Coming soon

Raster images

Big images become a compact text descriptor, with the full image one call away.

images are a huge hidden cost

The honesty contract

Every large result is either compressed or explicitly marked as a deliberate pass-through, with a typed reason. Silent skipping is treated as a bug - so you can always trust that nothing was quietly dropped on the way to Claude.

Only compresses when it pays offFiles > 50 ln / 2 KB·Bash ≥ 2 KB·Grep ≥ 20 matches·Glob ≥ 100 lnAnything smaller passes straight through, untouched. No round-trip you didn't need.
Smart file reading

The cheapest read that still answers the question.

Re-reading files is the single biggest token sink in agentic coding. Lineman climbs a ladder, cheapest rung first, and only pays for more when it has to.

free
Structural map
A real tree-sitter parse returns a table of contents of every symbol with line spans. Local, instant, no cloud round-trip.
free · local
cheap
Tiered cloud summary
When the map isn't enough, a secondary-model summary - and it gets terser the deeper into a session you are.
secondary LLM
cheap
Intent-aware summary
The summary is conditioned on what you're actually trying to do, so it keeps the parts that matter.
6% → 38% adequacy
mid
Targeted read
Pull just the slice that answers a question, or jump straight to a single symbol's body.
read_file_context
full
Verbatim on demand
When Claude needs the exact bytes to make an edit, it gets them. The raw is always one call away.
read_file_full
Context tokens savedinternal bench
250 ln27%
1,000 ln58%
2,000 ln29%
Headline: 30–60% of context tokens saved on large files - exact figures re-confirmed before publish.
Intent-conditioning works
Tailoring the summary to the live task lifted summary adequacy from ~6% to ~38% in our eval.
Small files pass through
Files under ~50 lines come back verbatim - there's nothing to gain by compressing them.
Read-once dedup
Re-reading a file already seen this session returns a tiny “already read” stub, not the content again.
Client-side delta cache
Re-reading a file that changed returns just a diff against the version Claude already saw.
Cross-file hints
A read can surface the symbols it references in other files, so Claude navigates without a scatter of extra reads.
Build, error & search triage

It reads the noise so you don't.

Build, test and CI output is enormous and mostly noise. Lineman turns a 500-line failure into the three lines that actually matter.

Bash(npm test) 512 LINES
PASS src/auth/login.test.ts
PASS src/auth/token.test.ts
PASS src/cache/lru.test.ts
PASS src/billing/usage.test.ts
console.log node_modules/.../emit.js:44
console.warn deprecation: use createX()
PASS src/billing/proration.test.ts
⚠ 14 deprecation warnings suppressed
PASS src/webhooks/stripe.test.ts
FAIL src/billing/invoice.test.ts
● creates an invoice › with usage
TypeError: Cannot read 'id'...
at BillingService.reconcile
...473 more lines of stack + output
Lineman 6 LINES
1 failing · 248 passed · 3 skipped
✗ TypeError: Cannot read 'id' of undefined
at BillingService.reconcile
invoice.test.ts:142
→ inv is undefined when usage list is empty.
Compressed 512 → 6 lines · 96% saved

Build & test triage

Parses compiler and test-runner output and extracts the actual errors and their locations.

Stack-trace classification

Classifies a crash into a typed diagnosis instead of feeding the whole trace into context.

Log analysis

Scans logs for the errors and warnings relevant to the issue being chased.

Test & diff summaries

Condenses test runs, large diffs and git history into something readable.

Relevance-ranked grep

Results are ordered so the most relevant hit is first, and oversized sets are trimmed.

Smart short-circuit

A handful of hits? Lineman skips the cloud step and returns them raw - no point paying to rank one screen.

Frictionless editing

Edit in one step. Skip the read-then-edit tax.

The classic agent loop reads a whole file just to change three lines - doubling that file's token cost. Lineman removes the round-trip.

1

Validated edits

Lineman confirms the exact target text exists before the edit and applies the change in one step - no “read the whole file, then edit it” detour.

2

Helpful misses

When the target isn't found or is ambiguous, Lineman returns the candidate locations and closest match, so Claude fixes it without re-reading or re-grepping the file.

Token cost of one small edit
Read-then-editread 1,200 ln · then patch
~9,600 tok
Validated editmatch + patch, in one step
320
≈ one full re-read saved, every edit
Smart Compaction · on by default

When context fills, finished work lifts out. Not your progress.

Claude Code's native auto-compaction bluntly truncates the conversation when context runs out. Lineman intervenes first - it spots completed chunks of work, moves them into recoverable storage, and leaves a compact pointer behind. Done work then costs almost no context, but stays fetchable.

01 / FillingContext is filling up
CONTEXT WINDOW · 200k72% occupied
Task A
Task B
Task C
live work
OFF-LOADED STORE · recoverable0 regions
Nothing stored yet - Lineman is still watching occupancy.
~24%
Mean total-cost cut in our marathon-session benchmark (-14% to -36% across runs)
0
Loss of task success - off-loaded regions are pulled back verbatim the moment they're needed again
On
By default. Re-anchoring also writes a handoff so you can start a fresh session with work intact
The honest meta-section

Engineered not to become the thing it's fighting.

A token optimiser that quietly costs a fortune would be self-defeating. Lineman keeps its own footprint honest - and shows its working.

Two tools, not twenty

Lineman exposes only two model-facing tools. Every tool description is re-paid on every single turn - a lean surface keeps the standing cost low.

2 tools · re-paid every turn

Trimmed prose

The tool descriptions are deliberately minimal. Trimming them alone improved a benchmark - wordy descriptions are a tax you pay on every turn.

+23% from trimming alone

No nagging

Lineman never injects persistent “reminders” into context. A standing reminder is a tax paid every single turn - so there are none.

0 persistent reminders
~4 callsto break even
Honest break-even. Registering Lineman each session has a small fixed cost - about 40–50k cache tokens, roughly $0.10–0.20. So Lineman pays for itself after about four calls in a session. A real coding session makes hundreds.
Proof

See the savings, line by line.

Every mechanism on this page ties back to something you can watch happen - and verify against your real Anthropic bill.

claude-code · session transcript
Bash(npm run build)
[Lineman] saved 87% on Bash(npm run build)
Read(src/services/billing.ts)
[Lineman] saved 41% on Read(billing.ts)
Grep(reconcile, src/)
[Lineman] saved 64% on Grep(reconcile)
// one line per saved call - nothing else changes
────────────────────────────
session so far · 2.1M tokens saved · ≈ $4.30
Visible to you · invisible to the model · costs 0 context

Honest accounting

The headline number discounts what Claude's own native compaction would have done anyway - so it matches what you can verify on your bill. We never inflate with naive totals.

Session stats, by task type

A per-session breakdown of tokens saved - reads, builds, search, web - feeds straight into the Cost Explorer dashboard.

Watch your own numbers add up

Open the Cost Explorer to see savings by task type, session over session.

Open the Cost Explorer
Questions, answered

Things developers usually ask first.

If you have something we haven't covered, email us and we'll get back to you.

Yes. The Free plan needs no credit card and gives you the cost and spend reporting dashboard, tracking up to $1,500 per month of AI agent spend across your repos, tickets, and models. Paid plans add Lineman's token-saving tool (40%+ fewer tokens), team seats, and uncapped reporting. You can start a 14-day trial of a paid plan at any time.

Free plan, no credit card

Drop it in. Watch your token bill drop by half.

One config line. Works with Claude Code today, more clients coming soon. Most users see their first compressed call within 30 seconds.

No credit card· 30s install· Memory-only processing