Skip to content

feat(eve): remote session-callback terminal envelope#1202

Open
ruiconti wants to merge 1 commit into
mainfrom
rui/remote-terminal-callback
Open

feat(eve): remote session-callback terminal envelope#1202
ruiconti wants to merge 1 commit into
mainfrom
rui/remote-terminal-callback

Conversation

@ruiconti

Copy link
Copy Markdown
Contributor

Part of the event-lane split for #1170. This PR is the durable control lane: remote-agent terminal callbacks. The relay lane (notifications → channels) and the research doc are separate PRs; this one stands alone off main.

What

Remote session callbacks now carry an event envelope discriminated by event.status. The terminal lane — status: "termination" with session.completed / session.failed — is the control path a remote call resolves on: the callee posts exactly one terminal callback, and the caller's callback route projects it into a subagent result and resumes the parked parent turn.

"notification", "working", and "input_required" are declared on the wire vocabulary but reserved — the terminal route rejects them. They belong to the relay lane, which has fundamentally different delivery semantics and lands separately.

Also folds in a remote-dispatch fix: a model-supplied empty outputSchema: {} is now dropped instead of forwarded, which otherwise forced the callee into structured-output completion and failed the call with OUTPUT_SCHEMA_NOT_FULFILLED. (Local delegation already filtered it.)

parseSessionCallbackparseCallbackMetadata, distinguishing create-session callback metadata from the new callback events.

Why two lanes

lane events guarantee mechanism
control (this PR) session.completed/failed exactly-once, never drop durable resume of the parked parent turn
relay (separate PR) authorization.*, future working fire-once, drop-ok best-effort render + stream append

A dropped terminal callback wedges the parent forever; a dropped notification is a sign-in button that doesn't render. Different tolerances, different mechanisms — conflating them under one "event callback" path was the mistake this split corrects.

Wire compatibility

The callback shape changed (events are now enveloped). Caller and callee deployments must both run this version; pre-1.0, per repo policy.

Unit suite green (5352), lint + guard clean.

Session callbacks now carry an event envelope discriminated by
event.status. The terminal lane (status: "termination",
session.completed/session.failed) is the durable control path: the
callee posts one terminal callback, the caller's callback route projects
it and resumes the parked parent turn exactly once, never dropped.

"notification", "working", and "input_required" are reserved on the
wire vocabulary and rejected by the terminal route — the notification
relay lane lands separately (it has different delivery semantics:
fire-once, drop-ok, rendering-only). Also drops a model-supplied empty
outputSchema in remote dispatch, which otherwise forced the callee into
structured-output completion and failed the call.

parseSessionCallback is renamed to parseCallbackMetadata to distinguish
the create-session callback metadata from the new callback events. The
callback wire shape changed: caller and callee must both run this
version.

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

vercel Bot commented Jul 25, 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, Comment, Open in v0 Jul 25, 2026 12:44am
eve-docs-1644 Ready Ready Preview, Comment, Open in v0 Jul 25, 2026 12:44am
eve-docs-4759 Ready Ready Preview, Comment, Open in v0 Jul 25, 2026 12:44am

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