#[non_exhaustive]pub enum Command<S>{
Resume,
Update(S),
GoTo(String),
ApproveTool {
tool_use_id: String,
decision: ApprovalDecision,
},
}Expand description
Resume directive supplied to CompiledGraph::resume_with.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Resume
Continue from the saved checkpoint exactly as it stands.
Update(S)
Replace the saved state, then continue from the saved next-node.
GoTo(String)
Continue with the saved state but jump to node next.
ApproveTool
Resume an AwaitExternal pause with the operator’s eventual
decision for the named tool_use_id. The resume path
attaches the decision to ExecutionContext via
PendingApprovalDecisions so the agent’s approval layer
short-circuits the approver on re-entry; the pending tool
dispatches with decision applied. Saved state is kept
intact (combine with Update(s) outside resume_with if
state mutation is also needed).
This variant does not depend on the enum’s S parameter —
the tool-use id and decision are state-agnostic. The S
generic is part of the enum’s shape (other variants need
it); operators reach this variant via the same
Command::<S>::ApproveTool { ... } path as any other.
Fields
tool_use_id: StringTool-use id matching the originating ContentPart::ToolUse
— the same id carried in the Error::Interrupted::payload
emitted by the layer.
decision: ApprovalDecisionOperator’s decision (Approve to fire the dispatch,
Reject { reason } to short-circuit). AwaitExternal
is rejected at runtime — pausing again on resume is
almost certainly an operator bug.