← Back to the MegaOpus page

Code Mode measurement

Measured · October 24, 2026

In Code Mode, the agent writes code that calls MegaOpus’s tools instead of calling them one at a time. In the first measurement, the Code Mode agent processed 44% more tokens than a regular agent, but Claude Code’s own cost estimate was 10% lower (tasks 1–6). The answers were as good or better.

Regular agent
1,345,389
Code Mode
1,942,842

Why can more tokens cost less? Tokens do not all cost the same. A token read from the cache costs about a tenth of new input, and output many times more. The extra tokens were mostly cheap reads from the cache (+56%), and there was about a third (31%) less expensive writing to the cache. That is why the total grew but the price fell.

In the repeat measurement on 9 Nov with another model, Code Mode used 4% more tokens, and its cost estimate was 42% higher. The measurements cannot be compared directly.

What the result does not tell. The tasks were seven read tasks in which the agent looked up and gathered information. In real work, the agent also changes code, runs tests and the conversation goes on longer, so the figures would probably be very different. That is why the next measurement is made with real tasks: two identical small projects are built both with regular MCP tools and with Code Mode.

Method. The same seven tasks were run once with each agent, 14 runs in total. The conversation was cleared before every run. Tokens were counted from Claude Code’s conversation logs, and the answers were checked against expectations locked in advance. The measurement was done by the debugger, a different agent from the agents that did the runs.