Factory's Droid Cuts AI Agent Token Waste by 50% With Deferred Context Engine

Factory's Droid agent now loads tool schemas on demand, cutting input tokens by up to 50% for large enterprise tool catalogs

·
·
·
Factory's Droid Cuts AI Agent Token Waste by 50% With Deferred Context Engine
  • Factory launched the Deferred Context Engine in Droid, loading MCP and internal tool schemas only when a task actually needs them.
  • Up to 50.8% token reduction for sessions with 100+ tools; 15.1% average across all MCP-triggered sessions in production.
  • Three failure modes addressed: attention dilution, tool-selection noise, and premature context compression in long tasks.
  • Skills and plugins follow the same discover-promote-reuse pattern, letting teams distribute large plugin bundles without prompt bloat.
  • Industry-wide problem: Atlassian and Claude Code shipped similar solutions concurrently, validating context bloat as a critical enterprise deployment blocker.
  • Available now across all Factory plans; Pro starts at $20/month, with Teams and Enterprise tiers for larger organizations.

As AI coding agents get wired into more tools -- MCP servers, internal APIs, workflow plugins -- a quiet tax has been accumulating on every single prompt. Every tool you connect comes with a schema: names, descriptions, parameter shapes, response formats. Load them all upfront, and you burn through your context window before the agent has done a single thing useful. Factory just shipped a direct answer to that problem.

The Deferred Context Engine is now live in Droid, Factory's autonomous software engineering agent. Instead of front-loading every tool schema into every prompt, Droid starts with a compact index of what's available, then pulls in the full schema only when a task actually needs it.

The tax nobody was talking about

The context bloat problem has quietly become one of the biggest friction points in production AI agent deployments. A single large MCP server can consume 10,000 to 17,000+ tokens of context per request just for tool descriptions. Stack a few of them together and things get ugly fast: in a deployment connecting GitHub, Slack, and Sentry -- just three servers totaling roughly 40 tools -- 143,000 of a 200,000-token context window were consumed by tool schemas. That's 72% of available context burned before a single user query was processed.

For enterprise teams, the numbers compound further. The official Atlassian MCP server consumes roughly 10K tokens for Jira and Confluence tools alone. The GitHub MCP server exposes 94 tools and consumes roughly 17.6K tokens. Combine several large MCP servers and you can easily spend 30K+ tokens on tool descriptions in every request. That's not overhead -- that's a product constraint.

Factory's own production data puts the enterprise picture in concrete terms. A single Droid session can connect to Sentry, Linear, GitHub, Figma, Playwright, Notion, Stripe, Vercel, Supabase, and a private internal registry. At 100+ tools, that enterprise stack carries roughly 47K schema tokens per prompt -- before any code, errors, or reasoning enter the picture.

How deferred loading works

The Deferred Context Engine uses progressive disclosure to separate discovery from execution. On each turn, Droid keeps a compact capability index -- tool names, short descriptions, server names, and enough input hints to decide whether a capability is relevant -- and loads internal tool schemas, MCP tool schemas, skills, and plugin instructions only when a task needs them.

The lifecycle follows three steps:

  • Discover: Startup context carries only compact metadata -- names, sources, short descriptions, and relevance hints.
  • Promote: When a task needs a hidden capability, Droid loads the full schema or instruction set through built-in context expansion tools.
  • Reuse: Frequently used internal and MCP tools stay warm in the tool cache across sessions; long-tail capabilities remain deferred.

Droid still keeps the full context graph reachable: system instructions, repository rules, memories, internal tools, MCP tools, custom skills, plugins, subagents, prior messages, and live artifacts. Nothing disappears -- it just doesn't occupy prompt space until it's needed.

What the production numbers show

Deferred context has been running in production. Over five days, among Droid turns in sessions that triggered MCP tools, it cut estimated input tokens by 15.1% on average and reached a 39.4% p90 reduction. Sessions with 100+ hidden deferred tools reached a 50.8% average reduction.

The savings curve is worth understanding. Small catalogs see modest gains. But the benefit scales sharply with catalog size:

  • 20-50 hidden tools: 21% average token reduction in MCP-triggered sessions
  • 100+ hidden tools: 50.8% average token reduction
  • p90 across all MCP sessions: 39.4% reduction

Factory is careful to note that the all-turns aggregate is intentionally not the headline. The all-turns aggregate includes small sessions, empty deferred catalogs, and reminder overhead. The real gains show up where enterprise setups live -- large tool catalogs, plugin bundles, and multi-server MCP configurations.

One interesting telemetry finding: 16.6% of telemetry sessions started MCP servers, but only 5.4% executed an MCP tool. Most sessions don't need every schema loaded. The cache handles recurring cases; deferral handles the long tail.

Beyond cost: why attention quality matters

Token savings are the easy-to-measure win, but Factory argues the deeper benefit is model focus. Large tool catalogs create three compounding failure modes:

  1. Attention dilution: Relevant files, requirements, and user instructions compete with unused schemas for the model's attention.
  2. Tool-selection noise: Similar tool names and parameter shapes increase the chance of selecting the wrong capability.
  3. Earlier compression: Static context fills the window faster, so long tasks hit compression sooner -- and every compression pass has to condense decisions, errors, and partial results into a smaller summary.

Prompt caching helps with cost, but it doesn't fully solve the attention problem. Even with caching, the model still has to process those tool definitions enough to determine they are unrelated to the task. Deferral removes the irrelevant definitions entirely.

Skills and plugins get the same treatment

The engine isn't limited to raw MCP tool schemas. Skills and plugins add another layer. A skill packages a workflow -- how to triage a Linear issue, run a QA flow, debug a Sentry alert, or implement a frontend surface using a team's design system. A plugin can bundle many skills, commands, MCP servers, hooks, and specialized Droids. All of these follow the same discover-promote-reuse pattern.

This matters for teams building internal tooling on top of Droid. You can now distribute large plugin bundles without forcing every user to carry the full plugin catalog in every prompt. The system self-manages what's hot and what's deferred.

The broader context

Factory isn't alone in recognizing this problem. Atlassian Labs shipped an open-source MCP proxy called mcp-compressor that wraps any existing MCP server and reduces its tool-description overhead by 70-97%. Claude Code has also rolled out Tool Search with Deferred Loading, which loads MCP tool schemas on-demand. The fact that multiple major players converged on the same solution in the same window validates the severity of the problem.

What Factory's approach adds is tight integration with the full Droid execution loop -- planning, implementation, testing, deployment -- rather than a proxy layer bolted onto the outside. The cache-plus-deferral system is aware of session state, tool frequency, and task context in ways a generic proxy can't be.

Factory closed a $150M Series C at a $1.5B valuation, with Droids used by hundreds of thousands of developers at companies including Nvidia, Adobe, Bayer, EY, MongoDB, and Zapier. The Deferred Context Engine is live now in Droid, available across all plans. Pro starts at $20/month for individuals; Plus at $100/month adds roughly 5x the usage. Enterprise tiers include dedicated compute and unlimited seats.

The underlying assumption being challenged here is that bigger context windows eventually solve the tool-bloat problem. They don't -- they just delay it. As MCP ecosystems grow and internal tool catalogs expand, the only durable fix is demand-driven loading. The Deferred Context Engine is Factory's production-validated bet on that architecture.

Trending
  • No trending articles

Comments

avatar

Next Reads