Skip to main content
The SDK returns Pydantic models for structured results. It raises typed exceptions for configuration, lifecycle, and session handoff failures.

Common result models

Import these models from modal_computer_use.
See the v1.1.0 model source for complete fields.

Top-level error types

The v1.1.0 package exports these errors at modal_computer_use:

Do not replay unknown mutations

Treat ActionOutcomeUnknownError as an indeterminate mutation. Do not replay the action through another route. OperationResultUnavailableError exposes a nonnegative sequence and an allowlisted operation_kind when the daemon supplied one. A borrowed client can call observe_after_result_loss() to capture one later full-screen PNG. That observation does not prove semantic success. It does not unblock later mutations in the same borrow.

Daemon errors

Direct primitive failures use this JSON shape:
Batch item failures use the same stable code as error_code. They place structured details in output. retry_safe describes duplicate-execution safety. It does not mean that automatic retry will succeed. See the v1.1.0 error source for module-level transport, validation, budget, artifact, and optional-dependency errors.