VS Code remote/devcontainer/codespaces support for prompt and model data
#237 opened on Nov 24, 2025
Repository metrics
- Stars
- (2,272 stars)
- PR merge metrics
- (PR metrics pending)
Description
Since the copilot agent chat session data is stored in the workspace storage, we need to build special support for remote VSC and codespaces
In codespaces, these chat JSON logs are only available in the browser in the indexed DB-based virtual filesystem. In the remote VSC/local devcontainer environment, the files are stored on the host, but there's no way (as far as I know) to access the host filesystem from the extension. Needs more research to figure out how we could pass this data across all of the environments to the git-ai CLI at checkpoint time.
This is the snippet of code where VS Code stores the chat session:
vscode/src/vs/workbench/contrib/chat/common /chatSessionStore.ts
private async writeSession(session: ChatModel | ISerializableChatData): Promise<void> { try { const index = this.internalGetIndex(); const storageLocation = this.getStorageLocation(session.sessionId); const content = JSON.stringify(session, undefined, 2); await this.fileService.writeFile(storageLocation, VSBuffer.fromString(content)); // Write succeeded, update index index.entries[session.sessionId] = getSessionMetadata(session); } catch (e) { this.reportError('sessionWrite', 'Error writing chat session', e); } } I found the code that's responsible for storing this file.