agentHost: avoid Agent Merge git refresh loop - #333120
Merged
Benjamin Christopher Simmonds (benibenj) merged 3 commits intoAug 28, 2026
Merged
Conversation
Ignore Git state refresh notifications emitted while the same Agent Merge evaluation is active so an idle monitored session does not continuously reevaluate and recompute its changesets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Benjamin Christopher Simmonds (benibenj)
enabled auto-merge (squash)
August 28, 2026 08:02
Copilot started reviewing on behalf of
Benjamin Christopher Simmonds (benibenj)
August 28, 2026 08:02
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/vs/platform/agentHost/node/agentMergeController.ts — This drops every Git-state refresh for the session while an evaluation is in flight, not just the… |
What changed in this PR
Prevents Agent Merge evaluations from looping on their own Git-state refresh notifications.
Changes:
- Tracks sessions with active evaluations and suppresses refresh-triggered rescheduling.
- Adds a regression test for the refresh cycle.
| File | Description |
|---|---|
agentMergeController.ts |
Guards evaluation scheduling during Git refreshes. |
agentMergeController.test.ts |
Tests self-trigger suppression. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…nalysis-error-fix-prioritization-a2448b7e
Pass the newly required Git service dependency to the refresh-loop regression test so the PR's synthetic merge compiles against current main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ladislau Szomoru (lszomoru)
approved these changes
Aug 28, 2026
Benjamin Christopher Simmonds (benibenj)
merged commit Aug 28, 2026
404ed7d
into
main
54 of 55 checks passed
Benjamin Christopher Simmonds (benibenj)
deleted the
benibenj/agents/log-analysis-error-fix-prioritization-a2448b7e
branch
August 28, 2026 09:29
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.

Summary
Root cause
attachSessionGitHubPullRequestrefreshes Git state during every Agent Merge evaluation. The controller handled that refresh notification as external work and immediately scheduled another evaluation, producing a stable loop at the Git refresh throttle interval.Testing
npm run compilenpm run eslint -- src\vs\platform\agentHost\node\agentMergeController.ts src\vs\platform\agentHost\test\node\agentMergeController.test.ts.\scripts\test.bat --run src\vs\platform\agentHost\test\node\agentMergeController.test.ts(13 passing)npm run hygienewas also attempted, but the task failed before source checks because its Windows URL path handling resolved the repository asC:\C:\Code\.... Targeted ESLint andgit diff --checkpass.