Heuristic
Turn repeated browser work into persistent programs
Use the browser to learn the path; use code to stop relearning it every time.
When it fits
- A browser agent repeatedly rediscovers the same navigation and action sequence on a site.
When to avoid it
- Do not freeze brittle selectors or bypass site rules. Persistent automation still needs authorization, monitoring and recovery.
Why it matters
After a browser interaction pattern becomes stable, encode the repeatable mechanics in a script or reusable skill. Let the live browser remain the state and feedback surface for checking whether the program still matches reality. Fall back to exploratory interaction when the site changes.
An example
An agent first learns how to export a monthly report through the UI; after repeated success, a reusable automation handles the known sequence while the browser verifies the resulting state.
Check your result
Repeated work uses a versioned, testable action path and still detects when the live site no longer matches it.
Keep this limit in mind
- Do not freeze brittle selectors or bypass site rules. Persistent automation still needs authorization, monitoring and recovery.
Evidence and sources
Repeated browser interactions can be moved into persistent programs or reusable website skills while live browser state remains the feedback surface.
Persistent automation becomes stale when websites or permissions change; it still needs error handling, observation and a fallback to fresh discovery.
Codex, Behind the Harness · 8:12, turn browser actions into persistent programs, within a harness that continues until a verifiable goal is reached