feat: add actionable config hints to all limit error messages#112
Merged
simongdavies merged 2 commits intohyperlight-dev:mainfrom May 7, 2026
Merged
Conversation
Every error message that fires when a configurable limit is breached now tells the LLM which config field to increase via manage_plugin. fs-read (4 messages): - maxFileSizeKb hint on all 'File too large' errors - maxReadChunkKb hint on per-call chunk errors fs-write (8 messages): - maxWriteChunkKb hint on per-call chunk errors (text + binary) - maxWriteSizeKb hint on cumulative write limit errors - maxEntries hint on entry creation limit errors fetch (9 messages): - maxRequestsPerMinute/maxRequestsPerHour on rate limit errors - maxDomainsPerSession on domain count errors - maxDataReceivedKb on data budget errors - maxResponseSizeKb on response too large errors - maxRequestBodySizeKb on request body errors - maxRedirects on redirect limit errors - maxJsonResponseBytes/maxTextResponseBytes on convenience method errors Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates limit-breach error messages across the built-in sandbox plugins to include actionable “which config key to increase” hints, intended to help an LLM resolve failures via manage_plugin.
Changes:
- Added config-field increase hints to fs-read limit errors (file size and per-call chunk size).
- Added config-field increase hints to fs-write limit errors (per-call chunk size, cumulative file size, and entry cap).
- Added config-field increase hints to fetch limit errors (rate limits, domain cap, data budget, response/body size caps, redirect budget, and convenience-method response caps).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| plugins/fs-write/index.ts | Adds config-field hints to fs-write limit errors for write/append and binary variants. |
| plugins/fs-read/index.ts | Adds config-field hints to fs-read limit errors for file size and per-call chunk size. |
| plugins/fetch/index.ts | Adds config-field hints to fetch rate-limit and size/budget limit errors (including convenience methods). |
- writeFile chunk error now advises 'first chunk via writeFile, rest via appendFile' instead of just 'split into appendFile' which would change overwrite→append semantics - writeFileBinary same fix for non-Office fallback message - All maxReadChunkKb and maxWriteChunkKb config hints now warn to ensure the sandbox buffer is large enough to match, preventing VM faults from raising chunk size without the buffer Signed-off-by: Simon Davies <simongdavies@users.noreply.github.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.
Every error message that fires when a configurable limit is breached now tells the LLM which config field to increase via manage_plugin.
fs-read (4 messages):
fs-write (8 messages):
fetch (9 messages):