Three Claude Code bug fixes, 1.55 million fewer tokens
reduction in total tokens
Original test requests
Verbatim original Portuguese requests preserved in both configurations, with English translations below.
C1
há um bug: o sócio consegue pegar um livro a mais do que o limite da categoria dele; corrija e crie um teste que cubra esse caso
English translation: There is a bug: a member can borrow one more book than the limit for their category; fix it and create a test covering this case.
C2
há um bug: a lista de veículos parados inclui veículo vendido; corrija e crie um teste que cubra esse caso
English translation: There is a bug: the stopped-vehicle list includes a sold vehicle; fix it and create a test covering this case.
C3
corrija o bug na detecção de conflito entre consultas
English translation: Fix the bug in detecting appointment conflicts.
Detailed measurements
library loan limit
| Metric | Reference | Studied configuration |
|---|---|---|
| Total tokens | 646,760 | 110,567 |
| Reported cost (USD) | 0.6793508 | 0.227407 |
| Elapsed time (s) | 65.5 | 52.7 |
| Target checks | pass | pass |
sold vehicles in stopped-vehicle list
| Metric | Reference | Studied configuration |
|---|---|---|
| Total tokens | 907,072 | 105,969 |
| Reported cost (USD) | 0.7471728 | 0.0865554 |
| Elapsed time (s) | 85.9 | 69.1 |
| Target checks | pass | pass |
schedule conflicts
| Metric | Reference | Studied configuration |
|---|---|---|
| Total tokens | 353,296 | 138,585 |
| Reported cost (USD) | 0.5549988 | 0.0877672 |
| Elapsed time (s) | 51.8 | 44.8 |
| Correct | 10 | 10 |
| Total evaluated | 10 | 10 |
Experimental methodology
Context optimization in the coding environment
Reducing context and auxiliary resources mobilized for coding tasks while preserving fix objectives.
Experiment definition
Three fixes in example systems: loans, vehicles and scheduling.
Comparative execution
Same requests, model and tasks in two Claude Code configurations.
Measurement
Input, cache creation, cache reads and output tokens; tool-reported cost and duration.
Result validation
Target tests passed in both workflows; pre-existing failures in broader suites were outside the task scope.
Files and references
Recorded laboratory data and provider documentation.
