Skip to content

feat(eve): define HITL request ownership lifecycle - #1578

Open
ruiconti wants to merge 3 commits into
mainfrom
rui/hitl-request-lifecycle
Open

feat(eve): define HITL request ownership lifecycle#1578
ruiconti wants to merge 3 commits into
mainfrom
rui/hitl-request-lifecycle

Conversation

@ruiconti

@ruiconti ruiconti commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What

  • HITL requests never block the conversation: an unrelated message runs as a normal turn and the request simply stays unanswered.
  • Unrelated input cannot mutate an existing request; only an authorized, correlated response settles it. ask_question opts into supersession by its originating actor.
  • Every nonautomatic approval emits input.requested; every non-settlement closure emits input.dismissed with a stable reason (superseded, cancelled, session-ended, route-lost).

Behavior

Before: an unrelated message lands in deferredStepInput and the session waits again without a model call. Parent cancellation and fresh child batches also drop request routes without telling the channel.

After: the message runs; the request stays pending out of band and is answerable late by splicing the stored approval suffix plus response — SDK-valid because collectToolApprovals only requires the tail tool message. Requests raised by one model step form a suffix group that splices when its last member closes.

Implementation surface

Two structural changes: pending requests become a per-requestId collection (today a singleton batch), and requests bind their originating { issuer, principalId } at creation. Acceptance gate: extend tool-loop-generate-approval-resume.integration.test.ts with an intervening turn before the approval response.

Scope

Contract only; no runtime changes. PR #1368 owns responder authorization and settlement events. PR #1231 denies unanswered approvals on any follow-up; this proposal keeps them pending instead.

Signed-off-by: Rui Conti <ruiconti@gmail.com>
Signed-off-by: Rui Conti <ruiconti@gmail.com>
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
eve-docs Ready Ready Preview Aug 4, 2026 12:20am
eve-docs-4759 Ready Ready Preview, v0 Aug 4, 2026 12:20am

Signed-off-by: Rui Conti <ruiconti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant