Skip to content

Fix delayed sequential steering in Copilot Agent Host - #346629

Merged
Joaquín Ruales (jruales) merged 2 commits into
mainfrom
jruales-steering-message-delivery
Nov 6, 2026
Merged

Joaquín Ruales (jruales) merged 2 commits into
mainfrom
jruales-steering-message-delivery

Conversation

@jruales

@jruales Joaquín Ruales (jruales) commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

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

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]>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 sdkSendInvoked when 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]>
@jruales
Joaquín Ruales (jruales) marked this pull request as ready for review November 6, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sequential Copilot Agent Host steering stays pending after the first message is consumed

3 participants