Skip to main content
An agent is passed to start() and run() as a provider value, as in sandcastle (ADR 0009): the harness it runs on, the model passed to that harness as written, and the provider’s own options.

Options every provider takes

The providers

A provider of your own

Any harness becomes an agent as { harness, model, effort?, env? }. A Harness starts sessions, sends them turns, steers, interrupts, forks and closes them, and says whether it is ready (installed and signed in, with the provider’s env).

Where sessions are kept

A provider’s harness keeps its session records where its own resume finds them: Claude Code’s under ~/.claude/projects/ (CLAUDE_CONFIG_DIR in the provider’s env moves it). start({ resume }) checks the record is there before anything starts, and rejects with SessionNotFoundError when it is gone. When a resumed session works somewhere new, its newest record is carried to that place’s folder, its cwd fields rewritten, unless the copy there holds messages the newest lacks; a title the person gave that copy stays its title. A harness of your own resumes only when it has sessions (exists and carry its records), as sandcastle’s providers need session storage. Without them it still runs and its open sessions fork, but start({ resume }) rejects with ResumeNotSupportedError before anything starts.

Errors