Skip to content

agentHost: persist server-side session config changes#327450

Draft
roblourens wants to merge 3 commits into
mainfrom
roblou/agents/investigate-session-mode-persistence
Draft

agentHost: persist server-side session config changes#327450
roblourens wants to merge 3 commits into
mainfrom
roblou/agents/investigate-session-mode-persistence

Conversation

@roblourens

Copy link
Copy Markdown
Member

Summary

  • persist merged Agent Host session config for server-dispatched changes
  • keep plan acceptance mode changes across session restore
  • add regression coverage for server-originated SessionConfigChanged actions

Validation

  • npm run compile
  • ./scripts/test.sh --run src/vs/platform/agentHost/test/node/agentSideEffects.test.ts --grep "SessionConfigChanged persists merged config values"
  • npm run precommit

Fixes #327435.

(Written by Copilot)

Persist merged session config values for both client- and server-dispatched actions so mode changes survive session restore.\n\nFixes #327435.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 25, 2026 06:27

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.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR ensures Agent Host session config updates originating from the server are persisted so they survive session restore, and adds a regression test for this behavior.

Changes:

  • Persist SessionConfigChanged merged config values when actions are server-dispatched (via envelope observation).
  • Keep plan acceptance/config mode changes across session restore by persisting merged config.values.
  • Add a regression test covering server-originated SessionConfigChanged persistence.
Show a summary per file
File Description
src/vs/platform/agentHost/node/agentSideEffects.ts Moves config persistence to an envelope observer so server-dispatched actions also persist merged config.values.
src/vs/platform/agentHost/test/node/agentSideEffects.test.ts Adds a regression test asserting server-dispatched SessionConfigChanged persists merged config values.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread src/vs/platform/agentHost/node/agentSideEffects.ts
Comment thread src/vs/platform/agentHost/test/node/agentSideEffects.test.ts Outdated
Keep fire-and-forget metadata persistence from surfacing synchronous database-open failures.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Poll for persisted metadata with a bounded timeout instead of relying on fixed delays.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Agent Host session returns to plan mode after plan approval and reload

2 participants