Durable operation admission #
Session creation and input admission use identified operations and durable
receipts. Acceptance records a decision. It does not mean that a turn completed
or that external tool effects happened exactly once. The request and response
contract is in openapi.yaml and
session lifecycle and recovery.
Ownership and atomicity #
operations.gleam owns receipt lookup,
duplicate checks, pending input, and operation outcomes. check_in returns an
existing matching receipt before checking a new ID. A different fingerprint,
kind, or target returns operation_conflict. admit_pending_then submits a
transaction to the store writer. admit_pending_in records both the receipt and
pending payload in that transaction.
conversation.gleam commits
identified session creation and its receipt together. create_child_identified
also commits family membership, the initial task letter, and identified pending
input in the same transaction. The task letter is marked IdentifiedInput so it
has an identified input delivery owner. The transaction fails if any part fails.
Recovery #
Clients retain the operation ID and request while resolving an uncertain result.
The HTTP contract describes lookup, duplicate behavior, retention, and
cancellation in
the input recovery contract.
operations.gleam stores delivery
state and provides pending input recovery and cancellation. A client stopping
its wait does not itself undo an accepted operation. Session state and
transcript ownership are described in sessions.
Human shell identity #
Human shell commands have their own durable identity and are separate from the
input queue. shell_commands.gleam
admits commands, records output and completion, and tracks transcript attachment
and delivery. Its interrupt_orphans_in marks orphaned running commands
interrupted during recovery. Attachment to history alone does not establish
provider delivery. mark_delivered_in records that state separately. See also
sessions.