Skip to content

fix(eve): finish cancellation through delegated agents#135

Open
remiconnesson wants to merge 1 commit into
codex/native-turn-cancellation-runtime-actionsfrom
codex/native-turn-cancellation-e2e
Open

fix(eve): finish cancellation through delegated agents#135
remiconnesson wants to merge 1 commit into
codex/native-turn-cancellation-runtime-actionsfrom
codex/native-turn-cancellation-e2e

Conversation

@remiconnesson

@remiconnesson remiconnesson commented Jun 20, 2026

Copy link
Copy Markdown

Summary

Stacked on #128 (with #127 and #118 beneath it).

Cancellation already reached delegated children, but after those children settled the parked parent turn resumed the model with cancellation errors. That could append an unexpected assistant message and complete the turn normally.

This PR preserves the cancelled outcome across the runtime-action callback. The resumed parent consumes the child results, starts with a live distributed signal, and is immediately cancelled instead of invoking the model again.

It also adds deterministic real-dev-server coverage for:

  • root -> local coordinator -> local sleeper
  • root -> coordinator -> remote sleeper on a second eve server
  • same-session follow-up after cancellation

Both scenarios assert the full failure cascade, absence of subagent.completed and message.appended, and successful continuation on the original root session.

Before / after evidence

Before #128, the tests showed that local children did not receive an AbortSignal and remote response.cancel() returned false.

On #128 before this fix, delegated children stopped, but their parents resumed and emitted an assistant response describing the cancellation.

With this change, local nested and remote delegated work stop, every active logical parent turn finishes as TURN_CANCELLED, the root session returns to session.waiting, and the next message continues that same session.

Review guide

  1. Start with the two tests in dev-server.scenario.test.ts; they are the executable end-to-end proof.
  2. Follow the cancelled marker from runtime-action-cancellation.ts through workflow-entry.ts.
  3. turn-workflow.ts consumes that marker by starting the resumed step with a live signal and immediately aborting it.
  4. The unit test covers the workflow-resumption edge directly.

Signed-off-by: Rémi Connesson <remiconnesson2@gmail.com>
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

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 Jun 20, 2026 10:30am

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