Skip to content

Commit 85b5f36

Browse files
committed
docs(spec): state the elicited resume binding in rule 4 of the confirmation contract
The elicited accept of a resume_run is bound to the screen the run was parked on when the person was asked; a run that moved on meanwhile is refused 409 and stays where it is. The host-door guide also names the 400 for an unusable screenNodeId and the looping-wizard limit. Claude-Session: https://claude.ai/code/session_01ADHkmSKdmdbBugjg8QSZGa Co-authored-by: Claude <noreply@anthropic.com>
1 parent 51975cc commit 85b5f36

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎content/docs/ui/actions.mdx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,10 @@ screen, so pass `screenNodeId` back: when the run is no longer on that screen
798798
(an earlier approval of the same item moved it on, or the person advanced it
799799
in the app) the call is refused **409** `RESOURCE_CONFLICT`, nothing resumes,
800800
and the run stays where it is. Without `screenNodeId`, the run's current
801-
screen is resumed with the values given. Decide each pending item once in
802-
your approve door. Without `confirm: true`, an action that declares
801+
screen is resumed with the values given. A `screenNodeId` that is `null`, empty
802+
or not a string is refused **400**, so omit the key for an item stored without
803+
one. A wizard that loops back to the same screen is not told apart by its
804+
screen id. Decide each pending item once in your approve door. Without `confirm: true`, an action that declares
803805
`ai.requiresConfirmation: true` is refused **428** `ACTION_CONFIRMATION_REQUIRED`,
804806
and an AI service account is refused whatever it sends. The answer is the REST
805807
envelope, with `resume_run`'s `{ ok, action, objectName, recordId, result }` as

‎packages/spec/src/contracts/ai-service.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,10 @@ export interface ActionConfirmationRequiredDetails {
517517
* - Elicited `accept`: the call dispatches as any admitted call does,
518518
* exactly once, under the caller's permissions. The confirmation covers
519519
* that one call: nothing is stored, and the next call is asked again.
520+
* For a `resume_run` call the accept is bound to the screen the run was
521+
* parked on when the person was asked: when the run has moved on to
522+
* another screen meanwhile, the resume is refused `409
523+
* RESOURCE_CONFLICT`, nothing resumes, and the run stays where it is.
520524
* - Elicited `decline`: the person said no. Refused, reason `declined`;
521525
* nothing runs. The caller does not retry unless the person asks again.
522526
* - Elicited `cancel`: the person dismissed the question without choosing.

0 commit comments

Comments
 (0)