Computer Use: Demo to Production.

A working computer-use demo isn't production ready just because it runs longer. This breaks down the seven changes that make the loop cheaper and its actions auditable.

1:55 video3 min readWatch on YouTube

There's a common assumption that a computer-use demo becomes production-ready simply by letting it run longer. It doesn't work that way. The naive loop, take a screenshot, send the full image to Claude, get an action back, repeat, has a running bill that gets worse the longer the task goes, and running longer just means paying that bill more times. The real fix isn't more runtime, it's a leaner loop.

The naive loop's real cost

A full-resolution screenshot costs around 1,200 tokens on its own, before Claude has taken a single action. That adds up fast: a 10-step loop already spends 12,000 tokens purely on screenshots before any useful work happens. Scale that further and the problem compounds. A 20-step task with no changes made along the way burns something like 40,000 tokens on screenshots alone, before a single action token is spent. That's the demo's real bill, and it only grows as the task gets longer, which is precisely why "just run it longer" is the wrong instinct.

Seven changes that make it production-grade

The production version of the loop makes seven specific changes:

  1. Resize every screenshot to about 1568 pixels wide, the resolution Claude's vision already performs best at, so you're not paying for pixels that don't improve the model's read of the screen.
  2. Drop screenshots older than the last few steps, since a stale image from ten steps ago rarely still matters to the current decision.
  3. Batch tool calls instead of sending them one at a time.
  4. Cache the system prompt so it isn't resent and re-processed on every single step.
  5. Compact the history server-side rather than letting the full conversation grow unchecked.
  6. Run actions in a sandbox, isolating what the agent can actually touch.
  7. Record every action as a structured trajectory event, creating a log of what the agent did at each step.

What the savings actually look like

Applied to that same 20-step task, resizing and pruning screenshots alone cut the screenshot bill by 70 to 80 percent. The reason the number is that dramatic is that the savings compound rather than simply add together: a smaller image costs less per screenshot, and dropping older screenshots means fewer images are being paid for at all, so the two effects multiply against each other rather than stacking linearly.

The seventh change answers a different question

The first six changes are about cost. The seventh, trajectory recording, isn't. A logged run proves what the agent did, not that it did the right thing, which is an important distinction to hold onto. But the flip side matters just as much: a run with no log doesn't mean nothing went wrong. It means you can't tell either way. Structured trajectory logging, capturing things like action type, the target element, and screenshot state before and after, is what turns an autonomous run from a black box into something you can actually review.

Production means leaner and logged, not just longer

The core distinction this walkthrough draws is that production isn't the demo running longer, it's every screenshot made leaner and every action logged, so the cost holds up over time and so does the record of what happened. Those are two separate engineering problems, and both need to be solved before a computer-use agent is genuinely ready to run unattended.

Key takeaways

  • A naive computer-use loop costs around 1,200 tokens per full-resolution screenshot, which compounds fast: 12,000 tokens for a 10-step task, roughly 40,000 for a 20-step task, before any action tokens are spent.
  • Resizing screenshots to about 1568px wide and dropping older screenshots cut the screenshot bill 70 to 80 percent in the source's reported case, because the two savings compound rather than add.
  • The other production changes are batching tool calls, caching the system prompt, compacting history server-side, and running actions in a sandbox.
  • Trajectory logging, the seventh change, addresses oversight rather than cost: a logged run proves what happened, not that it was correct.
  • An unlogged run isn't necessarily error-free, it's simply unverifiable.

Try it yourself

The video closes with a concrete exercise: design a trajectory logging schema for a computer-use agent, covering action type, target element, screenshot hash before and after, a confidence score, and whether human confirmation was requested, then ask what else the log needs to make oversight meaningful rather than just nominal. Run that against your own computer-use or agentic-loop setup today. This walkthrough is part of the Claude Basics playlist from Humanitarians AI, with code available in the linked GitHub repository.

Chapters

  1. 0:00Going to production just means running it longer, right?
  2. 0:11The naive loop and its running bill
  3. 0:31The concrete case: ~40,000 screenshot tokens
  4. 0:45Seven changes
  5. 1:06Cut down, and a second question
  6. 1:24Carry-out
  7. 1:32Your turn
  8. 1:50Outro
Full transcript(auto-generated, with timestamps)

Going to production just means running it longer, right?

[0:00]Someone assumes a working computer use demo is production ready if you just let it run longer. It isn't. The real fix is leaner. So, what actually changes between a demo and a system you can trust? The naive computer use loop take

The naive loop and its running bill

[0:12]A screenshot, send the full image to Claude, get an action, repeat. Screenshots are not free. A full resolution screenshot costs around 1,200 tokens. The natural assumption is that a working demo just runs longer once it's in production. It doesn't scale for free. A 10-step loop already spends 12,000 tokens on screenshots before Claude does anything. Here's the

The concrete case: ~40,000 screenshot tokens

[0:31]Concrete case. A 20-step task, no changes made, burns something like 40,000 tokens on screenshots alone before a single action token is spent. That's the demo's real bill, and it only gets worse as the task gets longer. The

Seven changes

[0:45]Production version makes seven changes to that loop. Resize every screenshot to about 1568 pixels wide, the size Claude's vision already works best at. Drop screenshots older than the last few steps. Batch tool calls. Cache the system prompt. Compact the history server side. Run actions in a sandbox, and record every action as a structured trajectory event. Back to that 20-step

Cut down, and a second question

[1:06]Task, resize and prune alone cut the screenshot bill 70 to 80% because the savings compound rather than add. But, the seventh change recording isn't about cost. A logged run proves what the agent did, not that it did the right thing, and a run with no log doesn't mean nothing went wrong. It means you can't tell.

Carry-out

[1:24]Production isn't the demo running longer. It's every screenshot made leaner, and every action logged, so the cost holds up, and so does the record.

Your turn

[1:32]Your turn. Here's the prompt. Read it with me. Design a trajectory logging schema for a computer use agent. Action type, target element, screenshot hash before and after, confidence score, and whether human confirmation was requested. Then, ask, "What else does the log need to make oversight meaningful, not just nominal?" Liam In for Bear. Computer use demo to production. Liam In

Outro

[1:52]For Bear.

More from HAI

Humanitarians AI Lyrical Literacy Project