thinker
Think ahead. Save tokens.
See how it worksnpx thinkersh
Think ahead. Save tokens.
See how it worksnpx thinkersh
Coding agents have transformed the software development lifecycle, automating every step to production. Thinker wires into your coding agents and finds cost savings and efficiency gains, so your agents produce accurate work without burning through your token budgets. We break down exactly where your Claude Code costs go so you can see which stages of your agent development need the most improvement. Our tools and suggested fixes make those improvements simple.
Thinker replaces the older tool results in your agent’s context with a placeholder, keeping the newest ones and the turn in progress. We only cut context when the input-token savings repay the cache rewrite within 25 calls. Most sessions run hundreds, so one cut keeps paying for the rest of the session.
That is the single biggest lever on Claude Code token usage, and it needs nothing from you. See the data for what it cut on real work in open-source repositories.
Thinker distills reusable information from your sessions so future ones can learn from what went right or wrong. It aggregates context on your workstreams and flags pitfalls past agents hit, like misusing an MCP tool or exploring code in the wrong directory.
It also picks up the habits that shape how you work, such as verification steps you previously had to ask for. The overarching goal is to get closer to one-shotting your initial prompt into the end state you wanted.
Keep your agent setup honest. Instruction files get bloated quickly, and unused tools quietly fill your context window while adding value to almost none of your sessions.
Thinker helps you find what works, and trim, remove or alias the context that doesn't need to sit in every agent's initial state.
Regularly scan your agent history to see which tools are serving you well, and what exists internally or externally that could give you a major productivity boost. Thinker indexes useful tools available for efficient agent use, and builds up local context on which tools are effective in your codebase.
Top suggestions come with estimated savings and their value to your agents' workflows.
Thinker plugs into the harnesses you already know. Install it on your machine with one command, npx thinkersh, and Thinker starts working for you behind the scenes.
Your code and prompts never leave your machine. Thinker sends anonymous size and count metrics, such as how much context was compressed, so we can see how it performs across installs. No prompt text, code, file paths or repository names are ever sent. Opt out with THINKER_TELEMETRY=off.
Fully open source, MIT license.
Uninstall any time with thinker uninstall --user.
Outside the research community, benchmarks like LoCoMo or BEAM don't answer the question that matters: does this get the job done at a lower cost? Instead, we ran two arms of coding agents, one with Thinker and one without, asked both to work through pull requests on open-source repositories, and had an LLM-as-a-judge verify that correctness did not drop on any task. See the session history and Thinker's activity for yourself here.