Repository navigation
Add experimental tool.group() for Sandboxes - #1795
Open
jpwilliams wants to merge 4 commits into
Open
jpwilliams wants to merge 4 commits into
jpwilliams wants to merge 4 commits into
Conversation
Steps created inside the callback get the prefix before their IDs, so concurrent callers can use the same IDs. They don't inherit the origin of the span they are in, since the code that created them is the user's. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A group tool runs at handler level with the global step. It has no step of its own: its inner steps are prefixed with the call's step ID, so two calls at once don't collide. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jpwilliams
added this pull request to stack #1792
October 15, 2026 21:23
🦋 Changeset detectedLatest commit: 9f48b6b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
[Medium impact] Adds experimental tool.group feature for sandbox execution. Fix the shared-directory collision for nested sandbox commands before merging. FindingsFix with agent prompt### Issue 1
packages/inngest/src/components/sandbox/toolRunner.ts:290
If two calls to the same `tool.group()` run `sandbox.commands.run("inner", ..., { tools })` on a shared sandbox, this prefix separates their durable step IDs but not their working directories. The nested `followCommand()` builds its directory from the raw `"inner"` ID and `runId`. The wrapper treats the second command as a retry and skips starting it, so both callers can read the first command's requests and result.
Include the active prefix when deriving the command directory and tool idempotency keys.
### Issue 2
packages/inngest/src/components/InngestStepTools.ts:401-402
The `prefix` check drops origins from every span inside a group tool, including spans explicitly created by a library inside the tool body. A nested `group["~span"]({ id: "work", origin: "@inngest/ci@0.1.0" }, ...)` no longer passes that origin to its steps. This breaks the documented inheritance rule and makes library-created steps look like user-written work.
Suppress the outer tool span's origin without suppressing origins set by inner spans.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds experimental
|
…inner span origins Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Sandbox code can now call
tool.group()tools, whose body is a group of steps. Run steps in parallel, invoke other functions and use their result, send events, or wait for one, all from a single tool call.Checklist
Added a docs PR that references this PRN/A Later bump