Repository navigation
Fix delayed sequential steering in Copilot Agent Host - #346629
Merged
Merged
Conversation
Keep promoted steering turns marked as SDK-dispatched so later steering reaches the running conversation instead of waiting for it to finish. Cover repeated steering and idle-before-echo promotion. Regression of #340669. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change preserving SDK-dispatch readiness during steering promotion.
No open issues 🎉
What changed in this PR
Fixes delayed sequential steering in Copilot Agent Host by preserving SDK-dispatch readiness when consumed steering becomes a new host turn. This addresses a regression from #340669 without changing startup or cancellation checks.
Changes:
- Preserve
sdkSendInvokedwhen promoting consumed steering. - Add regression tests for repeated steering and admission before a late SDK echo.
- Document readiness preservation during steering promotion.
No actionable findings remain. Reported validation uses mocked SDK tests; no live Fusion run was performed.
| File | Description |
|---|---|
src/vs/platform/agentHost/test/node/copilotAgent.test.ts |
Tests sequential steering after message- and idle-driven promotion. |
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts |
Keeps promoted steering turns ready for subsequent steering. |
src/vs/platform/agentHost/AGENTS.md |
Documents preserved SDK-dispatch readiness. |
Review effort: Balanced
Verify immediate send payloads, response attribution and readiness across sequential steering, idle-before-echo promotion, completion, abort and next-turn reset. Adapt complementary public regression coverage from #345885 while retaining provider admission before the late echo. Co-authored-by: I.Rezantsev <[email protected]> Co-authored-by: Copilot App <[email protected]>
Joaquín Ruales (jruales)
marked this pull request as ready for review
November 6, 2026 19:28
Joaquín Ruales (jruales)
enabled auto-merge (squash)
November 6, 2026 19:35
Connor Peet (connor4312)
approved these changes
Nov 6, 2026
Joaquín Ruales (jruales)
deleted the
jruales-steering-message-delivery
branch
November 6, 2026 19:49
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 #345884.
After a steering message was consumed, its new host turn lost
sdkSendInvoked. Later steering was then rejected as not ready and could wait until the entire request finished.Preserve SDK-dispatch readiness when promoting steering, without changing startup or cancellation checks. Cover repeated immediate sends, response attribution, admission before a late SDK echo, and readiness reset after completion, abort, and the next pending turn. Complementary regression coverage is adapted from PR #345885 from I.Rezantsev (@unclearriw).
Validation
pnpm run build-fast --client-only— passed../scripts/test.sh --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts --run src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts --grep "CopilotAgent MCP configuration preparation|CopilotAgentSession sendSteering|CopilotAgentSession.*[Ff]usion" --reporter dot— 166 tests passed.pnpm run eslint src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts src/vs/platform/agentHost/test/node/copilotAgent.test.ts src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts— passed.The provider regressions also failed with the production fix removed during the investigation. Tests use the real host classes with a mocked SDK; no live Fusion run was performed.
🤖 Written by GitHub Copilot on behalf of Joaquín Ruales (@jruales).