Agent Lifecycle
Task and attempt states, adapter responsibilities, verification and safe completion semantics.
Task states
The design distinguishes task state from a particular attempt. A task may be created, queued, assigned, starting, running, completed, failed, timed out, cancelled, waiting for retry, recovery-pending or awaiting review. Terminal state is not reversed by a late worker.
Attempt envelope
An immutable attempt envelope identifies task and attempt, agent-definition digest, input/artifact references, resource limits, deadline, permissions, network policy, secret references, budget reservation, retry policy, verifier and trace context.
Adapter contract
Proposed minimum operations are Probe, Prepare, Start, Observe, Checkpoint, Cancel, Collect and Cleanup. Cancellation must be idempotent; collected artifacts require checksums. An adapter's “done” signal is a candidate result, not independent verification.
Completion conditions
Persist artifacts durably, verify task-specific postconditions, confirm that the current lease generation may commit, release budget/resource reservations and clean the temporary environment. Report uncertain side effects as recovery-pending or review-needed.