In the rapidly evolving landscape of generative AI, the term "agentic" has become a buzzword synonymous with productivity. However, for many developers and researchers, the reality of deploying autonomous agents is often overshadowed by a stark financial bottleneck: the "token burn." At Quesma, we recently undertook an exhaustive investigation into the economics of AI agents—specifically, what agentic coding truly costs and how organizations can reclaim both their budget and the veracity of their data.

The initial results of our internal research were sobering. Attempting to map the complex world of AI "tokenomics"—including monitoring systems, governance frameworks, and optimization best practices—we deployed a standard pipeline using the /deep-research command. Within 30 minutes, the experiment consumed our entire Claude Max 5x subscription limit. The output? 111 agents launched, 123 claims queued for verification, but only 25 verified before the system hit a hard stop. The final synthesis never even ran. We had effectively paid a premium price for a digital "out of memory" error.

This failure served as the catalyst for a broader inquiry: how can we build a research architecture that is both cost-effective and epistemologically sound, using only the subscriptions we already possess?


The Chronology of Optimization: From Burnout to Efficiency

The journey to an optimized pipeline was, ironically, a lesson in "learning by doing." When the initial deep-research run hit its limit, I was left with no results and a blocked subscription. The immediate challenge was to pivot from a monolithic approach to a distributed, multi-model orchestration strategy.

The Multi-Subscription Synthesis

I realized that I was already paying for three distinct AI ecosystems: Claude, Codex, and Antigravity. Rather than forcing a single model to shoulder the burden of research, I sought to unify them. By extending the claude-mem plugin—a tool designed for persistent session memory—to support local integration with Codex and Antigravity, I created a shared intelligence layer.

I burned all my tokens researching how to save tokens - Quesma Blog

The logic was simple: whatever one tool discovered, the others could immediately access. This transformed three isolated subscriptions into a single, cohesive, and significantly more powerful research engine.

Establishing the "Agentic Hierarchy"

Through trial and error, I developed a model-orchestration pattern based on functional specialization. Not every task requires the reasoning capabilities of a frontier model like Claude Fable 5. By assigning specific roles to specific models, I drastically reduced token waste:

  • The Finder (Claude Sonnet 5): Chosen for its high performance on agentic benchmarks and cost-efficiency in bulk searching.
  • The Verifier (Claude Opus 4.8): A highly accurate worker utilized specifically for fact-checking and data validation.
  • The Strategist (Claude Fable 5): Reserved strictly for high-level planning, task decomposition, and resolving logical disputes.
  • The Executor (Codex/GPT-5.5): Highly adept at terminal benchmarks, environment setup, and tool inspection.
  • The Critic (Antigravity/Gemini 3.1 Pro): Provides a "second opinion" from an entirely different architectural lineage, effectively mitigating model-specific blind spots.

Supporting Data: The Architecture of the Pipeline

The technical backbone of this setup is a lightweight Bash script that allows the orchestrator to treat other vendor CLIs as headless subagents. This script acts as a gateway, routing requests to the appropriate model and saving the output to the shared memory pool.

The "Headless" Execution Wrapper

The script includes a crucial fallback mechanism. It monitors for error messages such as "usage limit" or "out of credits." If a subagent hits a wall, the orchestrator automatically re-routes the task to a Claude model. This ensures that the research flow is never interrupted by the limitations of a single vendor.

Phase Responsibility Model
Discovery Broad search & data gathering Claude Sonnet 5
Validation Cross-referencing & fact-checking Claude Opus 4.8
Execution Tool installation & CLI interaction Codex (GPT-5.5)
Peer Review Detecting bias & blind spots Antigravity (Gemini 3.1 Pro)
Synthesis Final report & logical mapping Claude Fable 5

By implementing this, I extended my research runtime by approximately 10x. I moved from 30 minutes of limited utility to several hours of continuous, high-quality production, all without spending a single additional cent.

I burned all my tokens researching how to save tokens - Quesma Blog

Truth, Trust, and the Problem of Hallucination

Cost was the first hurdle; trust was the second. Even with an optimized budget, AI agents are prone to "hallucinating" facts—citing non-existent sources or misinterpreting licensing agreements. To combat this, I implemented a rigorous, rule-based verification framework that evolved alongside the research.

The Evolution of Verification Rules

My rules were not pre-baked; they were a reactive response to failures. Every time the system flagged a piece of misinformation, a new constraint was added to the pipeline. Examples include:

  • Source Integrity: Findings must be linked to primary documentation; secondary blogs are insufficient for high-confidence scores.
  • License Verification: Automated checks must confirm the OSI status of any referenced project.
  • Source Citation: If a numerical claim (e.g., "50% faster") cannot be traced back to the specific line of a source document, it is automatically discarded.

Reversing the Workflow: Deep-Research as the Final Step

Perhaps the most significant change was the demotion of the /deep-research tool. Rather than using it as a starting point, I now utilize it as a terminal step. At the end of each day, the tool is fed a curated list of claims that have already survived the validation pipeline. It no longer needs to "explore" the web blindly; instead, it refines existing findings and fills identified gaps. This shift reduced token consumption by orders of magnitude while increasing the signal-to-noise ratio of the final output.


Implications: The Rise of the Hybrid Researcher

The ultimate goal of this project was to populate an LLM wiki—a knowledge base inspired by Andrej Karpathy’s documentation patterns. Stored in Obsidian, this wiki now contains hundreds of validated, atomic notes on AI economics.

Lessons Learned: The "Rule Bug"

The most humbling moment occurred when the system ignored Headroom, a massive open-source project. My strict validation rules had flagged its marketing claims as "unvalidated." The agents did their job perfectly, but the "human-in-the-loop" was initially absent, leading to a blind spot. I learned a critical lesson: agents can follow rules, but they cannot evaluate the wisdom of the rules themselves. A rule that is too rigid can be just as damaging as a hallucination.

I burned all my tokens researching how to save tokens - Quesma Blog

The Future of AI Economics

Our findings regarding tokenomics suggest several uncomfortable truths for the industry:

  1. Vendor Neutrality is Mandatory: No single model family is superior in every category; the best outcomes come from a multi-model stack.
  2. Context Window Inflation: Companies are paying for massive context windows they don’t always need. Smaller, task-specific models (like Sonnet or Haiku) often perform better when constrained to a single, high-fidelity task.
  3. Human Governance is the Bottleneck: The primary cost in AI research is not the tokens—it is the human time spent auditing the agent’s logic.

Conclusion: A Call to Action

The era of "blind prompting"—simply throwing a massive query at a chatbot and hoping for a coherent result—is coming to an end. For organizations to leverage AI effectively, they must treat their agentic workflows as software engineering projects. They require version control, CI/CD-style testing, and robust, human-led governance.

We encourage the community to move away from the "black box" mentality. If your AI spend is growing faster than your output, you aren’t just paying for intelligence; you are paying for inefficiency. By shifting to a tiered, multi-model, and human-verified architecture, you can build a knowledge base that is not only cost-effective but genuinely trustworthy.

We are eager to hear how others are navigating these waters. Are you building your own pipelines? Have you found a balance between model cost and model trust? Join the conversation on X or LinkedIn and share your setup—the economics of AI are still being written, and it is up to us to ensure they remain sustainable.