Skip to content

feat: add actionable config hints to all limit error messages#112

Merged
simongdavies merged 2 commits intohyperlight-dev:mainfrom
simongdavies:actionable-limit-errors
May 7, 2026
Merged

feat: add actionable config hints to all limit error messages#112
simongdavies merged 2 commits intohyperlight-dev:mainfrom
simongdavies:actionable-limit-errors

Conversation

@simongdavies
Copy link
Copy Markdown
Member

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

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>
Copilot AI review requested due to automatic review settings May 7, 2026 12:42
@simongdavies simongdavies added the enhancement New feature or request label May 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread plugins/fs-write/index.ts Outdated
Comment thread plugins/fs-write/index.ts Outdated
Comment thread plugins/fs-write/index.ts
Comment thread plugins/fs-write/index.ts Outdated
Comment thread plugins/fs-read/index.ts Outdated
Comment thread plugins/fs-read/index.ts Outdated
- 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>
@simongdavies simongdavies merged commit 7545c76 into hyperlight-dev:main May 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants