How do you make a computer-use agent reliable on tasks it repeats?

Let the agent do the task once, check the saved record, and compile that run into a program the agent calls for later runs. The program follows the same steps each time, makes no model calls, checks the record before and after each save, and stops when the screen doesn't match instead of guessing.

Updated 2026-11-21

Why repeated runs drift

A computer-use agent looks at the screen and chooses each click again on every run. The path can change from one run to the next, and every step is a model call with a screenshot. A program compiled from one checked run takes the same steps each time.

One new-patient referral on a local OpenEMR 8.0.0.3 test copy with synthetic patients, 62 timed runs each, 14 and 15 Oct 2026, judged by the same database read-back. The agent was Claude Sonnet 5.5 with computer use.
Agent aloneOpenAdapt program
Model callsOn every step of every run0
Screenshots sent to a modelThroughout every run0
Model cost per referralAbout $0.08 at list price$0
Path through the appChosen again each runThe same compiled steps
Median time36.5 s29.7 s
Referrals saved correctly62 of 6362 of 63

How it works

  1. The agent does the task once on your own model key while OpenAdapt records every action.
  2. The save is read back from the system of record before anything is compiled.
  3. A person reviews the draft program and approves it.
  4. Later runs call the program as one tool. It makes no model calls and sends no screenshots anywhere.
  5. When the app changes, the run stops before saving. An agent shows the fix, the program tries it up to the save without saving, and a person approves it.

It works on web, Windows, macOS, Linux and remote-desktop apps. How do you automate a desktop or Citrix app that has no API? covers what changes when the screen is only pixels.

Technical details

`openadapt wrap --task TASK` runs an agent task once (Claude or OpenAI, on your key) and reuses its checked, compiled tool on later runs. In Python, `openadapt_flow.jit.compile_agent` takes your own agent loop: the agent does the task, a draft is saved, and after a person admits it the program runs instead of the agent.

uvx --python 3.12 openadapt@latest wrap --help

Questions

Does the program replace the agent?

No. The agent still decides what to enter. The program makes the entry, checks it and returns a plain result.

What happens when the app changes?

The run stops before saving and says what didn't match. An agent proposes the fix, and a person approves it before it is used.

Does it need an API?

No. The program drives the same screens the agent used, and reads the record back wherever the system allows a second read.

Related: Your agent alone, or with OpenAdapt · How do you check what an AI agent actually saved?

Sources

  1. Referral timing run, local OpenEMR 8.0.0.3 test copy, 14 to 15 Oct 2026 (run data): 8 synthetic referrals, OpenAdapt (a program compiled to find each field by the page's structure, 0 model calls) against Claude Sonnet 5.5 (claude-sonnet-5-5) as a computer-use agent in a capped harness, warm starts, interleaved blocks, each chart read back from the database. Blocks 2 to 10, normal referrals saved correctly: 62 runs each; median 29.7 s (OpenAdapt) and 36.5 s (agent); agent median $0.083 a run at list price. Both 62 of 63 normal referrals correct; on the possible duplicate, no new chart in 9 of 9 for both. Block 1 left out (CPU shared with another process); with it (blocks 1 to 10), 69 of 70 correct for both, 29.7 s and 37.6 s (n=69 each). The same task from the 10 Oct recording without the page's structure: 62 of 63, 38.6 s median, slower than the agent.

See it on your process

Bring a task your team types every day. We'll tell you whether it fits and what a test on your own system would cover.