Building a free coding agent
Freecode is a free coding agent that runs in your terminal. Developers can use it to build features, debug errors, run tests, and understand unfamiliar codebases without a subscription or their own API key.
For founder Andrew Schmitz, the priority is maintaining the agent's intelligence while keeping it affordable enough to give developers as much free usage as possible. That makes harness efficiency central to what freecode is building.
Making web research more efficient
Web research was another opportunity to bring costs down. Freecode used Exa search and direct fetch, and Andrew wanted to measure how Context Search and Highlights would affect token usage and costs compared with that setup.
When tools return unnecessary tokens, whether from full page text or highlights that are too long or irrelevant, those tokens stay in the agent's context. For long-running sessions, that can increase input-token usage and model costs across later turns.
Andrew tried Context's Highlights API to reduce that overhead. Highlights returns passages relevant to the agent's query, reducing the unnecessary content carried forward from search results and fetched pages.
He benchmarked Context Search and Highlights against freecode's existing Exa search and direct-fetch setup using replays of real sessions that included web search. Across the complete replay workload, averaging 20 model steps per session, input tokens fell 9.8% and modeled LLM costs fell 13.8%.
Including Context's retrieval fees at Pro overage pricing ($1.80 per 1,000 credits), total modeled LLM and retrieval costs were 8.9% lower. The inference savings covered Context's cost approximately 2.8 times over.
Continuing to push harness efficiency
Within a day of trying Context, freecode had replaced its search and fetch tools in production.
The broader work at freecode is making advanced coding assistance sustainable as a free product. That means continually improving how its harness uses models, tools, and context so developers can take on more demanding work within free usage limits. Web research is one part of that ongoing engineering effort.