Repository navigation
sessions: align remote message orchestration limits - #350284
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit intoNov 25, 2026
Merged
Conversation
Apply per-session sliding limits to remote sends and keep retry deduplication separate from the message budget. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues require changes to the per-session remote-message rate limiting.
No open issues 🎉
What changed in this PR
Fixes #349953 by replacing the Agents window’s lifetime remote-message cap with a per-session sliding-hour limit, aligned with send_message while keeping local and remote budgets separate.
Changes:
- Shares rate-limiting logic and applies the existing orchestration setting to remote messages.
- Separates retry deduplication from budget accounting, reserves in-flight capacity, and excludes rejected or pre-dispatch failures.
- Adds cleanup ownership and tests for limits, recovery, retries, and uncertain delivery.
No actionable findings. Reported targeted tests passed; full client validation and live multi-host testing remain incomplete.
| File | Description |
|---|---|
src/vs/sessions/contrib/remoteSessions/test/browser/remoteSessionMessageRouter.test.ts |
Tests sliding limits, settings, failure accounting, reservations, and retry expiry. |
src/vs/sessions/contrib/remoteSessions/browser/sendRemoteMessageTool.ts |
Owns and disposes the message router. |
src/vs/sessions/contrib/remoteSessions/browser/remoteSessions.contribution.ts |
Registers the message tool for disposal. |
src/vs/sessions/contrib/remoteSessions/browser/remoteSessionMessageRouter.ts |
Implements per-session budgets, retry expiry, and delivery accounting. |
src/vs/platform/agentHost/node/shared/sessionServerTools.ts |
Reuses the extracted shared limiter. |
src/vs/platform/agentHost/common/sessionActionLimiter.ts |
Provides sliding-window limits and in-flight reservations. |
src/vs/platform/agentHost/common/agentHostStarter.config.contribution.ts |
Documents separately counted remote-message limits. |
Review effort: Balanced
Dmitriy Vasyura (dmitrivMS)
marked this pull request as ready for review
November 25, 2026 12:30
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge
November 25, 2026 12:30
1 task
Dirk Bäumer (dbaeumer)
approved these changes
Nov 25, 2026
Alex Ross (alexr00)
approved these changes
Nov 25, 2026
Dmitriy Vasyura (dmitrivMS)
deleted the
agents/fix-sendmessage-consistency
branch
November 25, 2026 14:13
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.
Fixes #349953
send_message; local and remote budgets remain separate.