Repository navigation
Allow Inngest Functions to be passed as Sandbox tools - #1796
Open
jpwilliams wants to merge 3 commits into
Open
jpwilliams wants to merge 3 commits into
jpwilliams wants to merge 3 commits into
Conversation
A function, or a reference to one, in tools is invoked with the call's named arguments as its event data. It is a group tool whose only step is the invoke, with its input checked against the function's trigger schema when there is one. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jpwilliams
added this pull request to stack #1792
October 15, 2026 21:24
🦋 Changeset detectedLatest commit: 758ec20 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 Inngest functions as sandbox tools. Fix schema selection for wrapped event triggers before merging. Findings
Fix with agent prompt### Issue 1
packages/inngest/src/components/sandbox/tools.ts:234-238
`triggerSchema()` misses schemas in supported triggers such as `{ event: eventType("order/refund", { schema }) }`. The schema lives on `trigger.event.schema`, not `trigger.schema`. These functions fall back to `z.record(z.unknown())`, so `{ orderId: 5 }` reaches `step.invoke()` despite a declared string schema. The handler receives invalid data instead of the sandbox getting an argument error.
Read wrapped event types before selecting the schema, and add a test for this trigger form.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds Inngest functions and
|
…emas
A function triggered by `{ event: eventType(..., { schema }) }` keeps its
schema on the event type, so tool arguments skipped validation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools
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
An Inngest function, or a
referenceFunction()to one, can now be a Sandbox tool. The code calls it with named arguments, which become the event data, and gets the function's result back. The invoke is a durable step.Checklist
Added a docs PR that references this PRN/A