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 with automations in every step to production. Thinker wires into your coding agents and finds cost-saving opportunities or efficiency improvements to make sure your agents produce accurate work without burning through your token budgets.
Thinker identifies cost saving opportunities to safely remove context from your coding agent session. We calculate the cost to re-write the cache compared to how much the context shrinks, and identify the savings on input tokens will be paid off after at most 25 API calls.
Typical sessions span hundreds of calls, so a single context cut can significantly reduce your token spend on the session. See the data for examples on how we cut costs on real work on open-source repos.
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. All data stays local. Telemetry metrics such as context compression sizes are exported so we can understand usage and performance and make sure users get a good experience. Opt out with THINKER_TELEMETRY=off.
Fully open source, MIT license.
Uninstall any time with thinker uninstall --user.
Supported harnesses Claude Code · Claude desktop app · Codex CLI and app · Cursor · Gemini CLI · Devin · Pi · Windsurf · Copilot CLI · OpenCode
Outside the research community, benchmarks like LoCoMo or BEAM don't answer the question that matters: does this get the job done? 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.