# 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`](../docs/openapi.yaml) and [session lifecycle and recovery](../docs/http-sessions.md). ## Ownership and atomicity [`operations.gleam`](../src/albedo/daemon/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 the receipt and stores the input in the session's [inbox](inbox.md) in that transaction. The inbox row carries the whole submission and shares the receipt's id. A pending input is a waiting inbox row with a pending receipt. [`conversation.gleam`](../src/albedo/daemon/conversation.gleam) commits identified session creation and its receipt together. `create_child_identified` also commits family membership and the initial task in the same transaction. The task is one inbox row: a letter from the parent that carries the child's first input under its receipt's id. 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](../docs/http-sessions.md#input-admission-and-outcomes). [`operations.gleam`](../src/albedo/daemon/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](sessions.md). ## Human shell identity Human shell commands have their own durable identity. [`shell_commands.gleam`](../src/albedo/daemon/shell_commands.gleam) admits commands, records output and completion, and tracks transcript attachment and delivery. A finished command's receipt waits in the [inbox](inbox.md) under the command's id. 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](sessions.md). ## Related pages - [All topics](README.md) - [Change guidance](contributing.md) - [Session attachment](sessions.md) - [Inbox](inbox.md) - [Provider requests](provider-requests.md)