Our development team has hired some new colleagues recently. They’ve helped us ship code faster than ever, though none of them appear directly on the payroll. Of course, I’m talking about AI agents. We use them to write code, scope new features, review our work and bounce ideas around. These days, I rarely go more than a few hours without typing a prompt.
I’d happily put them to work all day, freeing my own brain for the more important parts of the job (like responding to support tickets 😩). But agents are hungry, and their favourite food is tokens. This post is about tokenmaxxing: what it is, and how it’s possible to get useful work from agents without sending costs through the roof. I’ll share what I’ve tested, what has worked, and how to keep the resulting code clean and maintainable.
Quick definitions
Before we go any further, here’s a list of definitions for some of the technical terms referenced throughout the article.
Token: A small unit of data that an AI model processes, such as a word, part of a word, or punctuation.
Agent: An AI system that can independently perform tasks and take multiple steps towards a given goal.
Usage: A measure of how much of an AI service you consume, often based on the number of tokens processed.
What even is “Tokenmaxxing”?
Tokenmaxxing is shorthand for using AI agents to accomplish as much of your work as possible; more simply, maximising your use of tokens.
In practice, carelessly throwing every task at the most powerful AI model available is unlikely to be a sensible use of money. The real opportunity is to make extensive use of AI while still getting a worthwhile return on that usage.
We've established that tokens are essentially the chunks of text an AI model processes. An agent might read files, search a codebase, run tests, revise its work and try again, with each step potentially triggering another model call. Context, reasoning, retries and subagents can all add to the cost, and even cached input may still carry a charge. OpenAI's agent usage guide explains the breakdown in more detail.
We can cite the GPT-6 Astra API rates (retrieved September 2026) to demonstrate how quickly unchecked usage can add up:
One coding task using one million input tokens and 100,000 output tokens would cost about $15.
Five developers each running five similarly sized tasks a day, over 20 working days, would spend $7,500 a month, or $90,000 a year.
Caching, model choice, tools and subscription terms can drastically change the real cost, so this is an illustration rather than a typical bill.
For a small or medium-sized business, sufficiently heavy and inefficient usage could begin to compete with the cost of hiring another developer. Used well, an agent can help a developer investigate, implement and test more work while they remain responsible for its quality.
Therefore, the goal we want to achieve is to maximise the amount of valuable work AI can take on, whilst ensuring costs remain realistic.
So, how do we do it?
Our developers have AI credits through our JetBrains organisation, giving us access to agents in our IDEs and a budget to work within. At first, usage was uneven: some of us burned through credits on broad requests, while others barely used them. A JetBrains article on spec-driven development gave us a more deliberate way to work. We adapted its example prompt to suit our team, and we now begin our coding session by writing a specification.
We give an agent a high-level feature request alongside our `spec-driven-development-prompt.md` file which is attached as context. Before proposing a solution, it inspects the existing code and conventions, then challenges the request. What happens when a user lacks permission? What if a step fails halfway through? Which edge cases have we missed? When an answer would materially change the feature, the agent asks us instead of quietly choosing for us. More often than not, this discussion reveals a use case we had not considered.