AIToday
Large Language ModelsGitHub Blog (AI)Published: May 8, 2026, 10:00 JST1 min read

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

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

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.

Ask the AI about this article →

GitHub Blog (AI)Read Original Article

Get the latest Large Language Models news every morning

For example, today's edition would include:

  • Walmart settles opioid claims for $50MTop Companies AI · 1h ago
  • Tim Cook's legacy hinges on Apple's AI betTop Companies AI · 1h ago
  • CrowdStrike Falcon Guardian Targets AI SecurityTop Companies AI · 1h ago

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. Q&As are published on this page for other readers too.

Related Articles

Next articleOpenAI launches new voice intelligence features in its API, including GPT-Realtime-2 with reasoning capabilities, real-time translation across more than 70 input languages, and live transcription.