跳到正文

Assignment collaboration round-trips through the Bot Inbox

Status: Accepted

Assignment collaboration round-trips through the Bot Inbox

An Assignment communicates with its Orchestrator only through durable Source Events and Bot Inbox Admissions. The Orchestrator’s create_assignment is non-blocking: it returns the Assignment Session id right after durable admission, while a Host-lifetime Assignment Runtime runs the Session. Parallel Assignments are therefore ordinary work rather than a special mode, and the Orchestrator keeps its own turn free to start, inspect, answer, or reuse other Assignments.

The two directions of the collaboration use the same admission path, distinguished by provenance and declared intent. An Assignment Report is Session-origin and carries a state (progress, completed, blocked, waiting-human, failed) plus an expects-reply declaration. An Assignment Ask is a report variant whose expects-reply is set and whose state names the wait: it declares that the Assignment cannot usefully continue before the Orchestrator replies. A Lifecycle Notice stays Host-origin and limited to terminal boundaries. None of these is a direct Agent-to-Agent message, a second mailbox, or a copied Session log.

An ask ends the Assignment’s turn; it never holds a tool call open. The Orchestrator answers with the ordinary addressed send_assignment_request carrying answer-to naming the ask, so answering is the resume operation ADR-0045 already defines. Delivery follows the live state of the Assignment Session: an idle or cold Session is resumed and followed up, a running Session receives the answered request at its next step boundary. There is no timeout, reminder scheduler, or background retry; an unanswered ask remains visible as waiting state until a Human or Orchestrator resolves it, and restart reconciliation treats a recorded ask without a delivered answer as still open.

The Assignment’s declared state and expects-reply only suggest attention; the Host owns wake policy. The default suggestion maps terminal, blocked, waiting, error, and expects-reply reports to immediate attention, and progress milestones to digest attention; ADR-0025’s classes, Human configuration, and Observation rules remain authoritative. An immediate report reaches an idle Orchestrator as a new turn and a running one at its next turn boundary, never by interrupting the current step. Observation is recorded only when the item’s content or a faithful summary enters the Orchestrator’s turn input or an explicit read returns it. Unobserved repeats from the same Assignment coalesce into one Attention Unit that presents the latest summary with a repeat count and causes at most one wake; once observed, a later meaningful report is new attention.

Inbox items are pointers, not payloads. Each carries the Assignment Session id, causation, and artifact references, so the Orchestrator can read depth on demand. The Host spills an oversized report or ask body through the platform spill seam and keeps the locator plus retrieval hint in the item; inspect_assignment can read a bounded window of the Assignment Session’s events through Session Query. Full reasoning, tool traffic, and execution history stay in DSH SessionPersistence; exact Session Query reads are bounded, costed, and authorized by the calling Host module rather than by the model. File artifacts are addressed the same way: the Assignment reports a reference, and whether the Orchestrator may read the underlying path follows from the Workspace Grant that the Assignment ran in.

Reuse stays explicit. A Continuity Key that uniquely names one owned and resumable Assignment Session reuses that Session through an addressed request; a key held by a running Session is not stolen, and no Session is ever selected by cwd, recency, title, or prompt similarity. Creating past the Assignment Concurrency Limit fails immediately and structurally, as ADR-0045 already decided.

Rejected: holding the ask inside a blocking report_to_orchestrator call (keeps a turn open, leaves no durable mailbox, and cannot be reconciled after a restart); native DSH subagent messaging for reports (live-only, one-edge adjacency, no answer primitive, and rejected for independent root Assignments); letting the model choose DSH delivery primitives or wake classes; waking on every report instead of coalescing unobserved repeats.

Consequences: Assignment prompts and tests must be written for “end the turn with a question, continue when resumed”; the runtime owns detached Assignment runs, their failure classification, and restart reconciliation; the create path must admit concurrency before it records intent; and evidence for wake, coalescing, ask/answer, and restart behavior belongs in the runtime tests, not only in DSH Session history.

导航

输入以搜索…

↑↓ 导航↵ 选择Esc 关闭