Remove child handle result APIs#4517
Merged
Merged
Conversation
Contributor
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4517 +/- ##
===========================================
- Coverage 69.32% 55.66% -13.66%
===========================================
Files 77 300 +223
Lines 9277 33945 +24668
Branches 2896 9641 +6745
===========================================
+ Hits 6431 18897 +12466
- Misses 2828 15029 +12201
- Partials 18 19 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Electric Agents Mobile BuildLocal mobile checks ran for commit The EAS Android preview build was skipped because the |
icehaunter
approved these changes
Jun 5, 2026
kevin-dp
added a commit
that referenced
this pull request
Jun 8, 2026
Main commits absorbed during the rebase changed assumptions our PR relied on: - #4517 removed `.run` / `.text` from EntityHandle and `resolveRun` / `rejectRun` from SpawnHandleInfo. Strip those from the fork handle in setup-context.ts so it matches the simplified spawn shape. - Forks now get a `createdBy` field on `forkSubtree` calls; update the route test expectation accordingly. - #4516 removed the per-entity `error` stream; drop it from the fork rollback test's deleted-streams expectation. - Add the missing `doFork` mock to two `createHandlerContext` test configs in context-factory.test.ts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This removes the old child-handle result pattern where a parent could spawn/observe a child and then await
entity.run/ callentity.text()in the same handler invocation.We want child coordination to happen via durable server wakes instead:
wake: { on: "runFinished", includeResponse: true }wake.payload.finished_childKeeping an agent paused while it waits for child output is risky in serverless/function runtimes: the process may be suspended or shut down at any time. It also ties up the parent invocation and prevents the parent from returning to the runtime to handle other work. Durable wakes make child completion an explicit continuation point instead of an in-memory promise.
Summary
EntityHandle.run/EntityHandle.text()from the public runtime typesresolveRun/rejectRunplumbingrunFinishedwake payloads instead of same-wake child output readsinitialMessageto start child workwake: { on: "runFinished", includeResponse: true }to receive the result laterwake.payload.finished_child.responseas the durable child responseNotes
wake: "runFinished") remains in the runtime type for compatibilityincludeResponseVerification
pnpm --filter @electric-ax/agents-runtime typecheckwake: "runFinished"usages and no real removed child handle API references