For our scripts running in prod we handle this in 2 ways:

- We use runtime agents in very specific places. For example on Availity they frequently have popups right after you login, so if there's a failure right after signup we spin up an agent to close it and then resume the flow with basically a try/catch

- We wait for it to fail and then tell the agent to look at the error logs and use `libretto run` command to rerun the workflow and fix the error

We're thinking of extending libretto to handle these better though. Some of our ideas:

- Adding a global/custom fallback steps to every page action. This way we could for example add our popup handler error recovery to all page actions or some subset of them

- Having a hosted version which flags errors and has a coding agent examine the issue and open a PR with the fix

Curious if you have any other ideas!