Codex

Codex computer use: token usage explained

Computer use adds screenshots and action loops to Codex, which changes token consumption. What to expect and how to keep it bounded.

Quick answer

Computer use sends a screenshot on most steps, and images consume far more tokens than text. A short screen task can cost more than a long text task. Bound it with a step limit, a smaller viewport, and a clear stop condition, then check the session log for the image count.

Why screen tasks cost more

InputRelative costNote
Text instructionLowHundreds of tokens
Full screenshotHighDepends on resolution and tiling
Screenshot sequenceVery highEvery step resends prior images
DOM or text exportLow to mediumCheaper than pixels when available

The multiplier is the loop. Ten steps means ten images in context, and each new step resends the earlier ones.

Bound the loop

  • Give an explicit step budget and a stop condition.
  • Prefer a text or accessibility tree over a screenshot when the tool offers it.
  • Crop to the relevant window instead of the full desktop.
  • Start a new session for a new screen task.
  • Check the token count after the first run before scaling up.

Measure it

Session files record token counts per turn, so the image cost is visible as a step change. In UsageAtlas, open the session and compare turns with and without an image to see the per-image cost in your setup.

Why screen-driven tasks cost more

A computer-use run sends a screenshot or a description of the screen on every step, plus the action history. Even when images are not billed as text, the step count multiplies the context. A task that takes twenty steps pays for the growing history twenty times.

  • Keep the visible window small so each capture carries less.
  • Batch actions rather than verifying after every click.
  • Stop when the same screen appears twice.
  • Prefer a scripted path for repetitive UI work.

Compare the totals with a text-only task in Codex tokens per task.

Questions, answered

Do screenshots count as input tokens?

Yes. Images are converted to tokens, and the exact count depends on resolution and the model's image handling.

Is computer use available in Codex?

Availability depends on your plan and client. Check the current Codex documentation for your platform rather than assuming it is enabled.

How do I reduce computer-use token usage?

Fewer steps, smaller captures, and text-based page access where possible. The loop count matters more than image quality.

Browse by topic