Factory.ai

AI Coding Agents

Guides

Token efficiency starts with smaller tool results

September 24, 2026 - 2 minute read

A tool can succeed and still give a coding agent too much to read. A repository-wide search returns unrelated matches. A connector returns an entire conversation when the task needs one decision. Every later turn may carry some of that material forward.

Token efficiency starts with asking for a useful result at the right scope. Anthropic’s MCP research examines context overhead from tool use and describes processing data before returning it to the model. Its results apply to the demonstrated approach, not to an unmeasured Factory workload.

Keep tool results useful and bounded

Begin with the file, symbol, repository, or time window relevant to the task. Expand the search when the first result leaves a concrete question unanswered. A limit that hides the decisive error is as unhelpful as an unbounded log dump.

Factory’s project instructions can record where important code and validation commands live. Its MCP integration connects external tools and data sources. Use the tools’ available filters and permissions so Droid receives the material needed for the task rather than an unrestricted export.

Keep the returned evidence understandable. A concise failure report should retain the command, relevant error, and affected file. Stripping those details can force a second call or send the agent down the wrong path. Smaller output is useful when it preserves the next correct action.

Factory’s December 2025 compression research compares token reduction with retained context quality. The chart below comes directly from that published evaluation. Its results concern the tested compression methods, not tool-output filtering or a current model ranking.

Factory’s published compression evaluation comparing token reduction efficiency and summary quality.

Evaluate token efficiency across the completed task

That study evaluated continuation quality over 36,611 messages and found artifact tracking difficult across all approaches tested. This is a useful warning when deciding what to remove: exact file state and prior decisions may matter more than a compact-looking summary.

Compare total usage through accepted completion. Include retries, workers, and the follow-up calls needed to recover missing information. A smaller tool response that creates additional searches can increase the task’s overall cost.

The telemetry reference documents Factory’s exported usage measurements. Pair those with a task record showing validation, elapsed time, and reviewer intervention. Keep token counts separate from billed cost because cached input and other token categories can have different prices.

For an initial experiment, change one recurring tool call or repository instruction and rerun representative tasks. Keep the model and acceptance tests stable. Preserve enough detail that another engineer can explain why the result improved or regressed.

Discuss measuring tool and context overhead in your own workflows with Factory.

Further reading

Ready to build the software of the future?

Start building

Arrow Right Icon