AIToday

GitHub optimizes token usage in agentic workflows by removing unused tool configurations and replacing MCP calls with GitHub CLI commands.

GitHub Blog (AI)May 8, 20262 min read
GitHub optimizes token usage in agentic workflows by removing unused tool configurations and replacing MCP calls with GitHub CLI commands.

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  1. GitHub began systematically optimizing token usage of agentic workflows in April 2026, building a Daily Token Usage Auditor to flag significant consumption increases and a Daily Token Optimizer to propose specific improvements based on workflow logs and source code.

  2. The most common inefficiency was unused MCP tool registrations: a GitHub MCP server with 40 tools can add 10–15 KB of schema per API call even when the agent only uses two tools. Removing unused tools from configuration reduced per-call context size by 8–12 KB, saving several thousand tokens per run with no change in behavior.

  3. GitHub replaced MCP calls for data-fetching operations (pull request diffs, file contents, review comments) with GitHub CLI commands through two methods: pre-agentic data downloads (running gh commands before the agent starts) and in-agent CLI proxy substitution (routing CLI traffic to GitHub's API without exposing credentials to the agent).

  4. GitHub introduced an Effective Tokens (ET) metric that normalizes token consumption across different models by applying model cost multipliers (Haiku = 0.25×, Sonnet = 1.0×, Opus = 5.0×) and weighting different token types (input = 1.0×, cache-read = 0.1×, output = 4.0×) to distinguish cost reduction from model switching.

Discussion

No comments yet. Be the first to share your thoughts!

Log in to join the discussion

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

1 minute a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →