Most advice about token usage optimises the wrong end of the problem. The prompt you type is rarely the expensive part. What costs tokens is everything the agent reads on your behalf: file contents, command output, test logs, and the growing transcript of its own previous turns.

The techniques below are ordered by how much they save in practice, not by how clever they are.

Read less of each file

An agent that opens a 2,000-line file to change one function has spent most of its budget on context it will never use. Search first, then open only the range you need.

The saving compounds, because every file the agent reads stays in the transcript for the rest of the session. A file read once costs its tokens once; a file read in turn three is still being carried in turn twenty.

Filter command output before it reaches the model

Build logs, test runners and package managers are written for humans watching a terminal, not for a model paying by the token. A failing test suite can easily emit several thousand tokens of stack traces where forty would do.

Pipe noisy commands through something that extracts the signal:

pytest -q 2>&1 | tail -30
npm run build 2>&1 | grep -E "error|warning" | head -20

This is unglamorous and it is usually the single largest saving available.

Keep the task scoped

A long conversation costs more per turn than a short one, because the whole transcript is resent each time. Two focused sessions are cheaper than one sprawling session covering the same ground, and they usually produce better results, because the model is not weighing twenty turns of irrelevant history.

When a task changes direction substantially, starting fresh is a cost decision as much as a quality one.

Do not paste what the agent can read

Pasting a file into the prompt duplicates it: once in your message, and again when the agent opens the file to edit it. Point at the path instead.

What does not help much

Shortening your own prompts is mostly theatre. A carefully compressed instruction saves perhaps fifty tokens; a single unnecessary file read costs two thousand. Write the clearest instruction you can and spend your attention on what the agent reads, not on what you write.

Compressing the system prompt or tool definitions is similarly low-yield for most users, and it trades away reliability for a saving that rounds to nothing next to a noisy test run.