
GitHub Copilot on about half the tokens with --lean, and 9 to 29% fewer with no flags.
With --lean it drops 13 built-in tool definitions unless the prompt asks for their family; it finds and reads code through a symbol graph instead of grep dumps and whole-file reads, and trims tool output without breaking the provider's prompt cache.
Optional: connect --lean to your own Microsoft-Decision-1 deployment and it asks that model which tools a prompt needs. On 22 held-out prompts it kept all 13 needed tool groups (vs 3 for keyword rules), and in a 45-session 3-arm run on Copilot CLI 1.0.112 it cut raw tokens 41.4% at 15/15 pass (vs 14/15 for keyword rules alone on indirect phrasings). Off by default; the headline figures below are with MD-1 off.
Its core rules are proved in Lean 4, a proof checker, and tests check the proofs' assumptions against the code.
Quickstart · How it works · Proofs · Benchmarks · Interactive deck
Measured November 1, 2026 under GitHub's default routing, on Copilot CLI 1.0.105 with GPT-6 Astra, on short Django caller lookups. Each saving is against its own stock run on the same day. "Up to" is the best pooled result of any run under default routing: 53% fewer tokens and 54% lower cold-start cost, with 95% CIs of 48 to 57% and 53 to 56%. Runs through an evaluation relay on an older build went as high as 58.5% fewer tokens (table below). The no-flags range is the 95% CI of its run; the point estimate is 19%. The cost figure prices each session's first call as a cache miss; the bill itself fell 47% with --lean. Token counts and charges come from GitHub's own per-call records.
Quickstart
1. Install the GitHub Copilot CLI plugin
copilot plugin marketplace add All-The-Vibes/TokenMasterX
copilot plugin install token-master@token-master
# Or load from a local checkout
copilot --plugin-dir ./token-master-plugin
2. Prepare the runtime (once)
TokenMaster's MCP server and hook run on their own Python 3.12 environment with exact pinned packages; setup rejects an interpreter whose packages differ from the pins. Setup also needs graphify on PATH and OpenAI's cl100k_base vocabulary in tiktoken's cache. If you set COPILOT_HOME, use it in place of $HOME\.copilot.
$plugin = "$HOME\.copilot\installed-plugins\token-master\token-master" # or ./token-master-plugin in a checkout
$runtime = "$HOME\.copilot\token-master-runtime"
uv venv --python 3.12 $runtime
& "$runtime\Scripts\python.exe" -m ensurepip
& "$runtime\Scripts\python.exe" -m pip install -r "$plugin\requirements-runtime.txt"
& "$runtime\Scripts\python.exe" -c "import tiktoken; tiktoken.get_encoding('cl100k_base')"
uv tool install graphifyy # the PyPI package that provides the graphify command
The tiktoken line downloads the 1.7 MB vocabulary once. Setup verifies its SHA-256 and never downloads anything itself. Offline, copy a verified cl100k_base.tiktoken to the machine and set BRAINSPACE_TOKENIZER_FILE to its path before you start Copilot, or pass it to brainspace_setup.py with --tokenizer-file.
3. Run /token-master in your repository
Start copilot in the repository and type /token-master. It indexes the repository with Graphify, which takes a few minutes on a large repository the first time. Then it runs two installers with the runtime: setup.py wires up tokenmaster-nav and builds .token-master/brief.md (<= 320 tokens; run setup.py <repo> --refresh-brief later to fold verified cross-session symbol lookups into it), and brainspace_setup.py adds the view output-shaping hook, the new-session hooks.sessionStart brief hook, the launcher, and /tokenomics. Approve the commands when Copilot asks. Besides $HOME\.copilot, they write .token-master/ and graphify-out/ in the repository and add any missing .gitignore lines for them.
Type /tokenomics anytime to view your token usage, GitHub charges, and TokenMaster savings.
4. Start Copilot CLI through the launcher
Once /token-master has configured your host (or after running brainspace_setup.py --host copilot manually), start copilot through the installed launcher. Use the runtime's Python: in BYOK mode the launcher's shaping needs its tiktoken.