← Dorothy Merge Lab
AI efficiency

Three Claude Code bug fixes, 1.55 million fewer tokens

We compared three coding tasks across six real executions. Total consumption fell 81.4%, with both paths meeting the targeted correction criteria.

Ricardo Sargo·2 min read
CommentWhatsAppLinkedIn
Code · Fix · Tests · AI-assisted coding

Fixing a small programming error sounds straightforward. Yet AI may need to understand system rules, locate files, modify code and test its solution. That invisible work is often much greater than the size of the final change.

We wanted to measure this across three Claude Code programming challenges.

The three challenges

On November 25, we used controlled tasks in example systems: fixing a library's borrowing limit, preventing sold vehicles from appearing in an idle-vehicle list and correcting overlapping appointments. Each task ran in two configurations with Claude Opus: a reference path and one using Dorothy Merge technology.

Consumption for each fix

The library consumed 646,760 tokens in the reference and 110,567 in the optimized flow, an 82.9% reduction. The vehicle task fell from 907,072 to 105,969, or 88.3%. The scheduling task went from 353,296 to 138,585, or 60.8%.

Across all three tasks, consumption fell from 1,907,128 to 355,121 tokens: 1,552,007 fewer tokens, or 81.4%.

Recorded total consumption
81.4% fewer tokens
Reference1,907,128
Tested configuration355,121
Comparison of experiment records.
TaskReferenceOptimizedReduction
Library646,760110,56782.9%
Vehicles907,072105,96988.3%
Scheduling353,296138,58560.8%

The fix remained the objective

The targeted library and vehicle tests passed on both paths; the scheduling task passed all ten checks. The broader suites in the first two projects contained pre-existing failures outside the evaluated requests. Recorded total time fell from 203.2 to 166.6 seconds.

Cost reported by Claude Code fell from US$1.9815 to US$0.4017, a 79.7% reduction.

How to interpret the result

One task need not consume the same resources as another. Complexity, context and the path chosen by the AI make a difference. That is why we look at each of the three cases individually as well as the aggregate. What matters is completing the fix and preserving the tests that demonstrate it works.

Conclusion

The three fixes recorded 81.4% fewer tokens, preserving task-specific checks in both workflows. Savings totaled 1,552,007 tokens.

Product development: The optimization validated across three laboratory fixes is ready to guide integration into the next Dorothy Merge update.

Methodology and evidence

Applied techniqueContext optimization in the coding environment

Reducing context and auxiliary resources mobilized for coding tasks while preserving fix objectives.

Evaluated task: Three fixes in example systems: loan limits, sold vehicles and scheduling conflicts.

How we evaluated it: Same requests, model and tasks in two configurations. Tokens include input, cache creation, cache reads and output. Target tests passed; pre-existing failures in broader suites remain outside the task scope.

Operation record (JSON)

Official provider documentation

View test report and original requests

Discover how much usage you can reduce in your coding tasks.

Try Dorothy Merge

Conversation with the author

Share your experience, ask a question or leave your thoughts on the article.

Loading interactions…

Keep exploring