Run statuses
Every Skyvern run has a status that indicates its current state or outcome:| Status | What it means | Common causes |
|---|---|---|
queued | Run is waiting to start | Concurrency limit reached, sequential run lock active |
running | Run is actively executing | — |
completed | Run finished successfully | Task completed, but output may still be incorrect |
failed | System error occurred | Browser crash, network failure, infrastructure issue |
terminated | AI gave up on the task | CAPTCHA, login blocked, element not found, page unavailable |
timed_out | Exceeded max_steps limit | Task too complex, AI got stuck in a loop |
canceled | Manually stopped by user | — |
Check run status
You can check the status of a run using the SDK or API:Polling for completion
To wait for a run to complete, you can poll the status in a loop:Understanding failure reasons
When a run fails or terminates, thefailure_reason field provides details about what went wrong:
Common failure reasons
Navigation errors
Navigation errors
Element interaction errors
Element interaction errors
- “Element not found” — Element was not detected in the visible elements tree
- “Element not visible” — Element exists but is not visible (hidden, off-screen)
- “Element not interactable” — Element is covered by another element or disabled
Authentication errors
Authentication errors
- “Login failed” — Credentials rejected or login flow changed
- “CAPTCHA detected” — CAPTCHA appeared and couldn’t be solved
- “MFA required” — Multi-factor authentication needed but not configured
Data extraction errors
Data extraction errors
- “Required field missing” — Schema field marked as required but not found
- “Invalid data format” — Extracted data doesn’t match expected schema type
- “Extraction timeout” — Data extraction took too long
Error handling in workflows
Workflows support error handling at the block level, allowing you to define fallback behaviors when a block fails.Continue on error
You can configure a block to continue the workflow even if it fails:Conditional error handling
Use conditional blocks to handle specific error scenarios:- Run a block that might fail
- Add a validation block to check if it succeeded
- Use a conditional block to branch based on the validation result
- Execute recovery logic in the failure branch
Retry logic
For transient errors, you can implement retry logic:Custom error codes
You can define custom error codes in your task to map specific scenarios to programmatic error handling:Best practices
Always check status
Never assume a run completed successfully. Always check the
status field.Log failure reasons
Capture and log
failure_reason for debugging and monitoring.Use webhooks in production
Webhooks are more efficient than polling for production workloads.
Implement retry logic
Add retries for transient errors like network failures or timeouts.
Next steps
Common Issues
Step-by-step debugging for failed runs
Common Issues
Quick solutions to frequently encountered problems