Skip to main content
The SDK returns Pydantic models and raises typed exceptions for configuration, lifecycle, placement, transport, and recovery failures.

Common result models

Import public models from modal_computer_use.
See the model source and Step models for complete fields.

Placement and handoff errors

These checks fail before desktop mutation.

Mutation and recovery errors

Never replay an operation after possible dispatch. When a receipt proves completion but the result is unavailable, capture one later frame for diagnosis:
The later frame supports diagnosis. Task success and later mutation recovery remain explicit owner decisions.

Rate-limit errors

The daemon returns HTTP 429 when the weighted token bucket lacks capacity. DaemonHTTPError.retry_after_ms and its allowlisted Retry-After header report when capacity should be available. Rate rejection happens before mutation.

Protect failure data

Errors and logs must not contain bearer tokens, tunnel URLs, clipboard text, typed text, screenshots, artifact bytes, or provider credentials.