Agent bills grow quietly: spend depends less on how many tasks you run and more on how you phrase them. Here are seven techniques, ordered by payoff.
1. Match the model to the task
The biggest saving and the simplest. The flagship earns its price when the work has to hold a lot of context at once: reading unfamiliar code, refactoring across several files, chasing a race condition.
Parsing logs, rewriting text, generating boilerplate from a pattern and classification all run fine on a smaller model. The price gap between tiers is a multiple, not a few percent.
2. Ask for a short answer
Output costs several times more than input. One line in the prompt moves the bill noticeably:
Reply with code only. No explanation, no preamble, no summary of what you did.
It works almost every time, because by default the model leans toward explaining.
3. Do not paste a whole file when you need one method
Context is cheaper than output, but it is not free. On agentic runs it piles up: step twenty drags along the history of every step before it.
Cut out the part that matters. If the tool reads files on its own, tell it which file and which part.
4. Phrase the task more precisely
A vague brief is billed twice: once for generating the wrong thing, again for redoing it. In teams a noticeable share of tokens goes into repairing what the model itself produced.
A minute spent sharpening the request saves several iterations.
5. Break large tasks up
A ten-file task nearly always comes back with errors and rework. Five two-file tasks pass first time more often and cost less in total.
They are also easier to review.
6. Rein in background runs
An agent that fires in CI on every commit produces spend that tracks your team's activity, not your decisions. Hang it on pull requests instead of commits, or only on the branches that really need it.
7. Set a ceiling and watch the breakdown
A total tells you nothing until you know who ran it up. You need a breakdown by key and by project to see where iterations eat the budget.
In the codexkey dashboard you can set a monthly cap with alert thresholds, and sub-organizations put teams on separate budgets. When a threshold is reached, you either get a warning or the keys are frozen.
What it comes to in money
Check it against your own numbers: the site has a calculator with presets for typical scenarios. Enter your volume before and after optimizing, then compare.
In short
Three techniques carry most of the saving: the right model for the task, a short answer and a precise brief. The rest is hygiene that keeps the bill from creeping up unnoticed.