Repository navigation
[1.142] agentHost: preserve writable session downgrade compatibility - #341086
Merged
roblourens merged 1 commit intoOct 12, 2026
Merged
roblourens merged 1 commit into
roblourens merged 1 commit into
Conversation
Backport the complete writable session downgrade fix from #340980 to release/1.142, including review fixes, filesystem-error guards, and documentation. Preserve providerAbsent catalog data and its checksum bridge across revival. Co-authored-by: Copilot <[email protected]>
Contributor
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-version database compatibility is high-risk, and authenticated providers plus GUI downgrade round trips remain unvalidated.
0 open findings
What changed in this PR
Backports writable Agent Host session downgrade compatibility to release 1.142 while retaining provider-neutral runtime identities.
Changes:
- Adds runtime-to-storage identity translation across Agent Host databases, metadata, drafts, catalogs, and peer chats.
- Isolates current frontend caches from stable cache generations.
- Adds architecture documentation and comprehensive downgrade regression coverage.
| File | Description |
|---|---|
agentHostBootstrap.ts |
Initializes compatibility-aware storage. |
agentHostDatabase.ts |
Persists identity and checksum metadata. |
agentHostPeerChatStore.ts |
Preserves archived peer state. |
agentService.ts |
Selects compatible storage safely. |
compatibleAgentHostDatabase.ts |
Translates orchestrator persistence. |
compatibleSessionDatabase.ts |
Translates per-session persistence. |
serviceBootstrapping.md |
Documents storage initialization ownership. |
sessionDataService.ts |
Applies storage identity mapping. |
sessionStorageIdentity.ts |
Implements identity translation. |
sessionStorageIdentity.test.ts |
Covers compatibility and concurrency cases. |
AGENT_HOST_SESSIONS_PROVIDER.md |
Documents the persistence contract. |
localAgentHostSessionsProvider.ts |
Advances the local cache generation. |
localAgentHostSessionsProvider.test.ts |
Tests local cache isolation. |
remoteAgentHostSessionsProvider.ts |
Advances remote cache generations. |
remoteAgentHostSessionsProvider.test.ts |
Tests remote cache isolation. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sandeep Somavarapu (sandy081)
approved these changes
Oct 12, 2026
roblourens
deleted the
roblou/agents/native-session-storage-compat-release-142
branch
October 12, 2026 16:53
This was referenced Oct 15, 2026
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
Backport the complete session-storage compatibility fix from #340980 to
release/1.142.New local Agent Host sessions use provider-neutral
ahp-sessionruntime identities. Older stable clients infer provider routing from persisted schemes, so native-only storage can make sessions unopenable after downgrade. This preserves writable downgrade/re-upgrade without changing the protocol identity.Backport notes
origin/release/1.142atae69b41c5bd0f9fabd0a4c9a54c78819572a3903.providerAbsentcatalog retention, including our checksum bridge across exclusion/revival.Validation
Executed on this release branch after refreshing its dependencies:
npm run build-fast -- --client-only— passed.npm run typecheck-client— passed.npm run valid-layers-check— passed.npm run eslint -- src/vs/platform/agentHost/node/{sessionStorageIdentity,compatibleAgentHostDatabase,compatibleSessionDatabase,agentHostDatabase,agentHostBootstrap,agentService,sessionDataService,agentHostPeerChatStore}.ts src/vs/platform/agentHost/test/node/sessionStorageIdentity.test.ts src/vs/sessions/contrib/providers/agentHost/browser/localAgentHostSessionsProvider.ts src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostSessionsProvider.test.ts— passed without warnings.git diff --cached --check— passed.Affected test selection — 4,040 passed, 28 existing skips:
Downgrade evidence and limits
The implementation was also exercised current → unchanged stable 1.141.0 → current in an isolated, independently built worktree with mock SDK providers. Stable could list and restore sessions for Copilot CLI, Claude, and Codex; turn records, titles, drafts, peer additions/archive state, deletion, and historical addresses survived re-upgrade.
That round trip used the earlier implementation checkout; the final release backport is covered by the release-specific suite above. Authenticated real-provider SDKs, GUI downgrade/re-upgrade, and older stable versions were not exercised. The storage contract does not add wire aliases for older clients connected to newer hosts.
(Written by Copilot)