Skip to main content
Everything the harness throws is an Error with a code. Branch on the code, not the message — messages are for humans and will change. Three families:

Store — StoreError

Sandbox — SandboxError

Harness — HarnessError

Raised above the providers, most often forbidden: the session’s actor is not in the workspace’s permissions, or a discard actor asked for a commit session.

A command that fails is not an error

bash.execute resolves with a BashResult whose exit_code is non-zero — a red test suite is an outcome your code decides about, not something that goes down the catch path. The result’s error field, when set, is a BashErrorCode: timeout, sandbox, hydrate, sync, scope or internal, naming which stage went wrong.

In the event stream

A failure during a turn is also an error event — { code: "model" | "sandbox" | "store" | "connector" | "internal", message, recoverable } — so the UI can show it where it happened, and done reports the turn as failed.