Why Code Generation Matters in Agentic Coding Workflows (Flutter Example)
Dinko Marinac
Introduction
Agentic coding tools like Claude Code or Cursor are not just a novelty. They are redefining how developers build software.
These tools understand your codebase, generate files, apply rules, and follow commands across modules, not just a single snippet. They work with intent and autonomy, rather than acting as enhanced autocomplete.
In the past, code generation was mainly used to produce boilerplate and speed up the development of standardized features. It helped, but it always came with a cost.
Code generation was slow and disruptive, often breaking the developer’s flow. That break in rhythm forced developers to context-switch, check email, or drift into distractions while waiting for tools to finish.
Agentic coding does not suffer from the same flow-breaking problem, but code generation remains a core part of both existing and new codebases. I would argue it will become even more important as agentic coding operates on increasingly large codebases.
The more code an agent needs to generate or iterate on, the more tokens it consumes. That leads either to higher costs or to hard limits such as timeouts.
Let’s take a look at why code generation is such a strong addition to agentic coding.
Every Line of Code Generated Is Fewer Tokens Spent
In agentic workflows, cost is directly tied to token usage. The more code an agent reads, generates, modifies, or regenerates, the more tokens are consumed.
AI pricing is not static; it has already increased (looking at you, Claude). This happens because current usage is still heavily subsidized by venture capital. It’s not a sustainable long-term solution, and investors will want their money back at some point (probably sooner rather than later), which will lead to new price increases.
As codebases grow, the amount of work an agent needs to perform grows with them. That directly increases token usage and cost, and in some cases introduces practical limits such as timeouts.
Code generation reduces this pressure. When code is generated instead of being output by an agent, fewer tokens are spent overall. At scale, this becomes a meaningful cost and productivity advantage for teams.
Additionally, rules can be used to let the agent know that these files should not be ignored and explain what the agent can reasonably assume the generated code provides.
Code Generation Got Faster — And That Still Matters
Even in agentic workflows, code generation speed still matters. Not because developers are waiting on it in the same way as before, but because build times affect iteration speed, debugging cycles, and overall throughput.
In November 2025, the build_runner author released a major performance improvement that dramatically reduced generation times for large Flutter codebases.
Original announcement from the author:
I just released `build_runner 2.10.3` with another performance improvement, if you have a big codebase you will be happy, benchmark results:
1000 files: 2x faster (5s -> 3s)
2000 files: 5x faster (25s -> 5s)
5000 files: 27x faster (424s -> 15s)https://t.co/RKJsGJAEly— Morgan :) (@__davidmorgan__) November 14, 2025
These improvements matter regardless of whether agentic tools are used or not.
Faster generation leads to faster feedback, quicker debugging, and tighter development loops.
Conclusion
Code generation and agentic coding are a perfect pair when used properly.
While AI agents can generate large amounts of code, doing so consumes a significant number of tokens. In large codebases, this results in higher costs or practical limits such as timeouts. Code generation helps keep token usage under control by reducing how much work an agent needs to perform.
At the same time, improvements in generation performance reduce iteration time and keep workflows efficient.
My prediction is that as agentic coding becomes more common and pricing continues to evolve, code generation will become one of the tools to optimize pricing and keep the codebases consistent.
If you have found this useful, make sure to like and follow for more content like this. To know when the new articles are coming out, follow me on Twitter and LinkedIn.