At a Glance
Most of the token cost in agent-based AI software work comes from iterative code review and passing large contexts between agents, not from initial code generation.
ON THIS PAGE
What They Found
Analyzed 30 end-to-end runs of an agent-based software workflow and mapped where tokens were spent across development stages. Code review process consumed by far the largest share of tokens (about 59.4% on average). Across stages, input/context tokens dominated total usage (about 53.9%), creating a roughly 2:1 input-to-output ratio and exposing a heavy communication overhead. Different stages show distinct profiles: initial coding is output-heavy and cheap, while verification and documentation are input-heavy and costly.
Not sure where to start?Get personalized recommendations
By the Numbers
1Code Review averaged 59.4% of total token usage across all 30 tasks.
2Overall token split was 53.9% input, 24.4% output, and 21.6% reasoning — roughly a 2:1 input to output ratio.
3Initial Coding and Design were low-cost (8.6% and 2.4% average); Code Completion averaged 26.8% when triggered (occurred in 6 of 30 runs).
What This Means
Engineers building multi-agent AI toolchains should care because most cost savings will come from reducing context passing and redesigning verification protocols. Technical leaders and product managers can use the stage-level cost map to estimate project expense and decide when to add human checkpoints to avoid expensive agent loops. Researchers should use these findings to prioritize more efficient agent coordination and benchmarking across frameworks.
Key Figures

Fig 1: Figure 1 . Overview of our analysis pipeline.

Fig 2: Figure 2 . Average token usage by phase across all 30 tasks for ChatDev with GPT-5 Reasoning. Error bars represent ± 1 \pm 1 standard deviation. Note that not all phases occurred in every task (e.g., Code Completion n=6, Testing n=12).
Ready to evaluate your AI agents?
Learn how ReputAgent helps teams build trustworthy AI through systematic evaluation.
Learn MoreConsiderations
Findings come from a single agent framework (ChatDev) and one large model (GPT-5 reasoning), so results may change with other architectures or models. Only 30 tasks were analyzed and some stages (e.g., Code Completion, Testing) appeared infrequently, limiting confidence in those stage-specific numbers. The mapping from the framework’s internal phases to traditional development stages is an abstraction and other mappings might shift the reported shares. For reference, see the example of an agent in simple workflows.
Methodology & More
We ran the ChatDev multi-agent workflow on 30 diverse software tasks (from simple algorithms to larger apps) and logged every token used across mapped development stages: design, coding, code completion, code review, testing, and documentation. For each stage we separated tokens into input/context (what agents read), output (what agents produce), and reasoning (internal steps attributed to the model). The goal was to build a practical "cost map" showing where computational and financial expense is concentrated in agent-driven software work. Key results show that code review is the dominant cost center, consuming about 59.4% of tokens on average, while initial design and coding are comparatively cheap. Across the whole workflow more than half of tokens are input/context, supporting the idea of a tokenomic patterns where agents repeatedly pass large contexts to each other. Practically, this suggests the best levers for reducing cost are smarter context management context management (sending only deltas or summaries), better verification protocols (human checkpoints or targeted checks), and architectural changes to how agents exchange information. Future work should expand to more tasks, other models, and other multi-agent frameworks to see how general these tokenomic patterns are.
Avoid common pitfallsLearn what failures to watch for
Credibility Assessment:
Some authors have modest h-index values; overall limited high-profile affiliation signals and arXiv venue.