IT Brief UK - Technology news for CIOs & IT decision-makers
United Kingdom
Google Cloud issues guide to cut AI coding token use

Google Cloud issues guide to cut AI coding token use

Mon, 20th Jul 2026 (Today)
Sean Mitchell
SEAN MITCHELL Publisher

Google Cloud has published a guide on reducing token use when working with AI coding assistants. The document sets out 11 principles for software engineers using large language models in development workflows.

The guidance argues that too much context increases latency, raises costs, and makes models more likely to miss instructions or produce false outputs. It presents token use as both a technical and financial issue for teams that rely on AI tools to write, test, and review code.

Central to the advice is a call for developers to start with a mid-range model and move to larger models or higher-reasoning settings only when a task proves too complex. The aim is to avoid spending more tokens than necessary on routine work while reserving heavier processing for design tasks or difficult debugging.

Another recommendation is to avoid repeating workflow instructions in every prompt. Instead, engineers should package recurring guidance, testing rules, and environment information into reusable files and scripts that an agent can trigger automatically.

Google Cloud also urges teams to automate repetitive tasks with scripts and command-line tools. Examples include formatting multiple files, extracting log data, and running setup, linting, and testing through official tools rather than repeated prompt-based interaction.

The document advises developers to use read-only commands to study a codebase before making changes. That approach is intended to reduce trial-and-error cycles that consume tokens and delay work.

Managing context

Several principles focus on limiting how much information an AI assistant must carry through a session. For output-heavy work such as deep research or splitting front-end and back-end tasks, the guide recommends using sub-agents and then reconciling final results, rather than tracking the full chain of intermediate output.

It also recommends separating planning from execution. Under that model, a long-context, high-reasoning session is used to build a detailed plan, which is then carried out in a new, low-token session. Developers are encouraged to create checkpoints through commits or other artefacts so they can restart cleanly once context begins to fill up.

Testing strategy is another part of the guidance. Engineers are told to automate verification early, prioritising local builds and unit or functional tests before using browser-based smoke tests at the end of a milestone.

The document also addresses cases where an AI agent begins to drift from the intended task. In those situations, users should revert files or use undo tools rather than keep adding corrective prompts to what it describes as a broken state.

Prompt discipline

On prompting, the guidance favours specificity over length. Developers are told to point agents to exact files, sections, or errors, and to use direct annotations rather than send the model on broad searches through logs or large parts of a codebase.

Inline comments are highlighted as another way to keep requests precise. More broadly, narrowing the target of a task can cut token consumption while improving the chances of a useful result.

Recurring behavioural issues should be addressed by updating standing rules in files such as AGENTS.md or by editing reusable skills, rather than restating corrections in every interaction. Google Cloud presents that approach as a way to make changes persist and limit prompt repetition.

The guidance also warns against autonomous loops that keep scanning projects for pending work. While those loops may identify optimisations, they can quickly consume a token budget unless they have hard limits, stop conditions, and event-driven triggers.

A final recommendation is to start a fresh session when moving to a new subject. Reusing the same chat is useful only when the topic remains the same, because a new session can limit the context pulled into the model and produce a more focused answer.

Cost and control

The publication reflects a wider shift in software engineering as developers move from writing every line of code themselves to directing AI tools through structured prompts, rules, and workflows. In that environment, token management is emerging as a practical issue tied to speed, model behaviour, and cloud spending.

The guide frames tokens as a finite resource because each model call relies on physical computing infrastructure. That places token efficiency alongside conventional concerns such as build time, test coverage, and infrastructure cost.

"Tokens aren't infinite. Behind every LLM call is a real, physical machine doing work to produce output for you. Prioritize the projects and features you care about. Token optimization is about directing the AI's attention. By using a tiered approach you keep development fast and output sharp, while optimizing spending," Google Cloud said.