Skip to content

[cherry-pick] fix: handle BudgetExceededError after background compaction re-render#312912

Merged
bhavyaus merged 1 commit intorelease/1.118from
cherry-pick/312901
Apr 27, 2026
Merged

[cherry-pick] fix: handle BudgetExceededError after background compaction re-render#312912
bhavyaus merged 1 commit intorelease/1.118from
cherry-pick/312901

Conversation

@vs-code-engineering
Copy link
Copy Markdown
Contributor

Cherry-pick of #312901 from main.

Problem

When the initial prompt render throws BudgetExceededError and a completed background compaction is applied, the re-render was unprotected. If the compacted prompt still exceeded the budget (e.g. many MCP tools/skills consuming token space, or Anthropic cache breakpoints preventing pruning), the BudgetExceededError propagated uncaught and crashed the chat with:

Fixes #311407

@vs-code-engineering vs-code-engineering Bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Apr 27, 2026
@bhavyaus bhavyaus merged commit 3920deb into release/1.118 Apr 27, 2026
26 checks passed
@bhavyaus bhavyaus deleted the cherry-pick/312901 branch April 27, 2026 22:24
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants