pause(ctx.session) at useful checkpoints, inspect the page state, iterate on code, and use resume to continue from the pause before redeploying.recoveryAction to a workflow when you want Libretto to recover after a supported Page or Locator action fails. Libretto calls the recovery action, then retries the original action once.123456789101112131415export default workflow("reviewOrder", { input, output, recoveryAction: popupRecoveryAction({ provider: "openai", apiKey: process.env.OPENAI_API_KEY!, model: "gpt-5.5", maxSteps: 3, }), handler: async ({ page }, params) => { await page.goto(params.url); await page.locator("#review").click(); return { complete: true }; }, });
popupRecoveryAction() is the built-in preset for closing popups and other blockers. Use computerUseRecoveryAction() when you want to provide your own instruction.gpt-5.5 and claude-sonnet-4-6.