Technology & The Future

Pushing Coding Agents to the Edge: Lessons from Burning 304M Tokens

This Saturday, I burned through 304 million tokens, roughly equivalent to 2,800 to 3,000 books. The idea was simple.

Varun Rao
Varun Rao
2026-04-19·4 min read
Pushing Coding Agents to the Edge: Lessons from Burning 304M Tokens
Editorial visual for Pushing Coding Agents to the Edge: Lessons from Burning 304M Tokens

This Saturday, I burned through 304 million tokens, roughly equivalent to 2,800 to 3,000 books. The idea was simple. I wanted to push coding agents beyond their limits by continuously prompting them to rebuild one of my software stacks in Rust. Using AI for coding is not new to me. I have been working with early AI coding tools and more recent coding agents for over six months. But this experiment opened up something deeper. It gave me a glimpse into what the future of software engineering could look like.

When a codebase is fresh, agents perform surprisingly well. With just a few prompts, they can produce a clean and reasonable architecture. This makes sense because they have seen a vast number of well-structured examples. It reminds me of chess openings where the first few moves are well understood, and many paths can still lead to a strong game. As developers, we are comfortable in this phase. Setting up directory structures and defining initial application layers are relatively easy decisions. But this clarity does not last.

As development progresses, the number of possible decisions increases rapidly, and even a small mistake can push the system in a completely different direction. Software design behaves in the same way. Every decision compound, and each new feature interacts with what already exists. We also work under constraints such as limited time, limited tokens, and the pressure to deliver value. In such situations, refactoring often feels like something we can postpone. This leads to an important question. If AI can make good architectural decisions at the beginning, why do we still need refactoring? Because software is not a onetime decision. It is an ongoing optimization problem. There is no perfect path, only tradeoffs made with the knowledge available at that moment.

At the beginning, generating code with AI agents feels almost free. You can move fast, explore ideas, and build quickly. But if early decisions are not guided well, the system can become difficult to manage. By difficult, I do not mean broken. I mean fragile. A system where adding a new feature starts affecting existing behavior in unexpected ways and where change becomes expensive. The faster you move without constraints, the harder it becomes to bring the system back to a healthy state. A healthy system is one where new feature can be added with minimal impact on what already exists.

One approach that worked well for me was introducing constraints early, especially through testing. I started writing a large number of test cases, and these tests acted as boundaries that guided the agent toward the direction I wanted. A few principles became clear. Tests should lead development and come before features. Smaller units of code help and limiting the number of lines per file encourages better modular design. Constraints work better than instructions. Instead of telling the agent what to do, define what must be true through tests and let the implementation follow. Every change should be guarded, with each feature passing through unit tests, integration tests, and regression checks, not just human review.

This experiment changed how I think about software engineering. The role of the developer is slowly shifting from writing code to designing systems of constraints. Instead of asking how to implement a feature, we begin to ask what boundaries ensure the feature is implemented correctly. In this sense, test driven development becomes more than a methodology. It becomes a control system for AI assisted development.

AI does not remove the complexity of software. It amplifies it. It accelerates both good decisions and bad ones. If left unconstrained, it can take you far, but not always in the direction you intended. With the right guardrails such as tests, modular design, and disciplined iteration, it becomes a powerful collaborator. We are no longer just writing software. We are shaping how software gets written.

· · ·
Varun Rao

Varun Rao

Writer & Technologist

Writing on careers, AI autonomy, mental models, and the evolving nature of work. If this essay made you reflect, explore the topic hub or subscribe for periodic dispatches.

Dialogue & Amplification

Share this Essay

If this piece prompted reflection, challenged your assumptions, or provided value, share it with colleagues or start a discussion on LinkedIn.

Discussion

0

Join the conversation

Sign in with Google to post your thoughts, reply to other readers, and like insightful reflections.

No comments yet.

Be the first to share an insight or question.

Related ExplorationsAll essays →
Pushing Coding Agents to the Edge: Lessons from Burning 304M Tokens — Varun Rao — Varun Rao