Repository navigation
fix(server): leave the tool-call limit to the sandbox, keep a 256 backstop - #1560
Merged
Merged
Conversation
The dashboard interpreter capped a script run at 16 tool calls before the sandbox's own limit applied. Raise it to 48 to match sandbox-runner#13; rounds stay at 8. Tests cover 48 calls (in one round and across rounds), the 49th call, and the 8-round limit. Claude-Session: https://claude.ai/code/session_01DuFZ75cVMd52YVqv9C6XBF
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
abhithesys
previously approved these changes
Nov 5, 2026
…kstop OpenUI Cloud's sandbox enforces the tool-call limit per script run (48) and fails the run itself. Hardcoding the same number here meant every limit change needed a release of this package and every app to upgrade. Keep only a high backstop against a misbehaving server. Rounds stay at 8 (only this package counts them).
…or code and round size in the changeset
A round's whole batch ran at once with Promise.all, so one large batch (48 from an honest sandbox, up to the 256 backstop from a misbehaving server) started that many of the developer's tools simultaneously. A small pool caps it at 16, keeps the result order, and starts no more tools once the run is aborted or times out.
The pool (at most 16 tools at a time per round) goes in a separate PR so this one stays the call-limit change only.
AbhinRustagi
previously approved these changes
Nov 9, 2026
AbhinRustagi
approved these changes
Nov 9, 2026
This branch was successfully 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.
What it does better
What
@openuidev/server's dashboard interpreter stopped a script run at 16 tool calls (packages/server/src/tools/execute.ts), before OpenUI Cloud's sandbox applied its own limit. The sandbox now allows 48 (sandbox-runner#13), and muse#653 tells the model 48.Raising the number here to 48 would mean every later change to the sandbox's limit needs a release of this package and every app to upgrade. So this package no longer owns the limit:
SCRIPT_ERROR, message "TOO_MANY_TOOL_CALLS: scripts may make at most 48 tool calls per execution" (was codescript_limitfrom this package). This package keeps only a backstop of 256, to stop a runaway loop if the server misbehaves.Why
Ship order
Safe on its own: a run over the sandbox's limit fails there, with the sandbox's error. muse main still accepts at most 16 tool results per round, and its prompt still says 16 calls in total, so rounds over 16 only happen once muse#653 (which raises both) is deployed. Ship #653 before telling developers about 48.
Also changes: a round can now ask for up to 48 of the developer's tools (was 16), and one round's outputs can now reach the sandbox's 16 MB per-round cap. A round's batch still runs all at once; capping that (at most 16 tools at a time) is a separate PR.
Changes
MAX_TOOL_CALLS16 → 256 as a backstop, with a comment saying the sandbox owns the real limit.MAX_ROUNDSstays 8.@openuidev/serverpatch.Testing
@openuidev/server:tscclean, vitest 11/11, prettier clean.Child of
dashboard-fixes.🤖 Generated with Claude Code
https://claude.ai/code/session_01DuFZ75cVMd52YVqv9C6XBF