The Open Framework for Building Agents
User-message continuation
Every accepted user message must reach its own answer, required input request, or explicit failure/cancellation. An unanswered request cannot silently stop that message's work.
A sign-in or tool approval holds its turn open until it is answered. A message from the same person steers the held turn: it cancels the requests still waiting (they resolve as ignored and their calls never run) and the turn carries on with the message. Answers already given, as in a partial approval, keep their effect. This holds whatever turnPolicy the client sends, because a queued message would wait on a turn that waits on that person.
This directory contains 37 scripted evals: 23 regressions and 14 controls. They exercise the HTTP session, approval, tool, workflow, and event-stream paths. A deterministic model chooses calls and constructs answers from the results it receives. There is no model judge and no manually seeded pending state.
These sessions select the scripted model through a fixture-only header in every CI world, including Local. The sibling pending-approval-tool-followup.eval.ts adds two cases using the CI-selected model: real models in Local, the fixture mock in Postgres and Vercel. Passing scripted cases does not establish live-model coverage of the whole matrix.
Start with read.eval.ts: leave a change's approval pending, ask for a draft status, require its answer, then check that the message cancelled the change. Other cases vary the pending requests, delivery order, or result type.
Scenario syntax and classification
Each body uses Given / When / Then comments to identify the initial state, accepted input, and observable outcome. defineEval.description names the scenario. Native tags classify role (regression or control), triggering input (user-message or input-response), and behavior (tool-result, tool-error, validation, workflow, provider-result, approval, authorization, partial-approval, stale-response, budget, or text-reply). Every case also carries hitl and continuation.
The tags are filters, not expected verdicts: every case must pass. eve eval --tag regression, --tag control, or --tag partial-approval selects the corresponding conversations. This is ordinary executable defineEval code with native assertions; Given / When / Then is not a separate executable spec language.
What makes a passing answer
expectReply requires exactly one matching message.completed, followed by exactly one turn.completed, both attributed to the same turn. A tool result, unrelated reply, or completion without an answer cannot pass. New messages use their own message.received turn ID. Approval responses require successful resolution of the saved request before its matching reply and completion in the held turn, with no new turn.started. A message that steers a held turn joins that turn, so its message.received carries the held turn's ID.
Each approval ID is saved when emitted. The driver's latest-turn request list is not treated as durable pending state. Tests check that a steering message cancels the saved request (ignored, with a not-run result) and that the change never executes. Budget cases require the next budget request instead of an answer beyond the granted limit.
Regressions
Each row maps to exactly one eval. “Response authorization” here means the fixture checks the authenticated responder's principal; it does not exercise an OAuth callback.
| Conversation | Required outcome | Eval |
|---|---|---|
| Read while A waits | Report returned status; A is cancelled | read |
| Write while A waits | Confirm exactly one write; A is cancelled | write |
| Parallel read and write while A waits | Report both results | parallel tools |
| Tool throws while A waits | Explain the actual error | tool error |
| Invalid tool input while A waits | Correct input and report the result | invalid input |
| Response-authorized approval waits | Finish an unrelated read | authorized pending |
| Approve newer B while A waits | Execute B, read, and reply | approve sibling |
| Cancel newer B while A waits | Leave B unexecuted, read, and reply | cancel sibling |
| Approve newer response-authorized request while A waits | Settle authorization, read, and reply | authorized sibling |
| Ask for A while a response-authorized request holds the turn | The request is cancelled; approving A runs it and replies | authorized older sibling |
| Answer cancelled A while a newer response-authorized request holds | The stale answer steers like a message; nothing runs | ordinary older sibling |
| Workflow completes while A waits | Interpret its result | workflow result |
| Provider supplies a tool result while A waits | Report the distinct provider result | provider result |
| Submit A from a same-batch A+B pair, then request a read | A runs once, B is cancelled, and the read completes | partial approval, tool |
| Submit A from a same-batch A+B pair, then request text only | A runs once, B is cancelled, and the reply completes | partial approval, text |
| Repeat a resolved response while A waits | Process the new input without authorizing A | stale response |
| Grant another budget window while A waits | Run one tool, then request the next required grant | budget grant |
| Submit A and B from one batch in separate deliveries | Accumulate both responses, execute both once, and reply | separate approval responses |
Controls
| Conversation | Required outcome | Eval |
|---|---|---|
| Read without older input | Report returned status | read |
| Write without older input | Confirm exactly one write | write |
| Parallel tools without older input | Report both results | parallel tools |
| Tool throws without older input | Explain the error | tool error |
| Invalid input without older input | Correct input and report result | invalid input |
| Workflow without older input | Interpret its result | workflow result |
| Provider result without older input | Report distinct provider result | provider result |
| Budget renewal without older approval | Run one tool, then request next grant | budget grant |
| Text-only message while A waits | Reply without new tool calls; A is cancelled | text only |
| Resolve the only approval | Execute, read, and reply | resolve only approval |
| Approve both calls together | Execute each once and reply | approve both |
| Workflow finishes beside an approval from the same turn | Observe workflow completion before approval; require approval before final reply | same-turn workflow |
Evidence boundaries
The adversarial integration probes cover the same held-turn rules at the harness boundary, plus a responder's sign-in expiring and a message waiting behind a budget prompt. Integration workflow results are injected at runtime boundaries; the E2E cases execute fixture tools through the durable runtime.
Partial approvals in E2E use an accepted HTTP response followed by a separate user message; the API rejects combined message/response payloads. The provider cases supply a provider-executed result at the scripted model stream boundary; they do not contact a provider that performs the tool. Budget scripts report synthetic token usage against the fixture's one-million-output-token limit.
These tests serialize inputs. They do not establish restart/replay safety, concurrent-delivery correctness, child-agent settlement, OAuth recovery, or every provider/channel combination. Run E2E only in CI. A timeout identifies a runtime regression only when the captured events establish that the intended setup and tool path ran; a fixture error is not such evidence.