microsoft / microsoft/vscode

Critical: Chat session data lost when computer sleeps - Data loss + Financial loss

Open
#325,822 0 comments 0 reactions 1 assignee Claimed by @roblourens View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

# Bug Report: Critical Data Loss - Chat Session Not Persisted When Computer Sleeps

## Environment
- **VS Code Version**: 1.128.0
- **Copilot Extension Version**: 0.56.0
- **OS**: Windows
- **Date of Incident**: July 13, 2026
- **Workspace**: Multi-root workspace (ESP32/PlatformIO project)

## Issue Summary
Long, active Copilot chat sessions are completely lost when the computer goes to sleep, with no warning, no recovery mechanism, and no local backup. This results in both **time loss** and **financial loss** (paid tokens) for users.

## What Happened
1. User had a multi-hour working session with Copilot on July 13, 2026 (earlier in the day)
2. Computer went to sleep while VS Code was open with active chat session
3. When computer woke at 23:39:52 (11:39 PM), VS Code created new empty session
4. Previous session data was completely lost - only session start marker exists, no conversation data

## Evidence
- **Session ID**: `7f0b47c0-fd2c-44c1-93ad-9a29e4d09ebf` (created 2026-07-13T23:39:52.529Z)
- Transcript file exists but contains only: `{"type":"session.start",...}` followed by unrelated conversation
- Debug log (`main.jsonl`) contains only empty session_start markers
- No conversation data written to disk despite hours of active usage
- Reindexing with `session_store_sql` confirmed 0 turns indexed for the session

## Financial Impact
This represents **paid token usage** that was lost. The user paid for:
- Multiple hours of conversation
- Detailed architectural discussions and design reasoning
- Problem-solving iterations
- Code analysis and recommendations

All of this paid content is now permanently lost due to inadequate data persistence.

## Root Cause
Chat sessions appear to be held entirely in memory during active use, only flushed to disk when the session formally ends. When the computer sleeps, this in-memory data is lost, and a new session is created on wake without preserving the previous session's content.

## Expected Behavior
1. Chat sessions should be **incrementally saved to disk** as the conversation progresses
2. Users should receive a **warning** before actions that risk data loss (closing workspace, sleep detected, etc.)
3. **Auto-recovery mechanisms** should exist for interrupted sessions
4. **Clear documentation** should warn users about data loss risks

## Actual Behavior
- No incremental saves
- No warnings
- No recovery options
- Complete, silent data loss
- Financial loss with no recourse

## Severity: CRITICAL
This is not just inconvenient - it represents:
- **Data loss** of irreplaceable intellectual work
- **Financial loss** of paid API usage
- **Business impact** for professional users
- **Trust erosion** in Copilot as an enterprise tool

## Reproduction Steps
1. Start a long Copilot chat session (multiple exchanges)
2. Put computer to sleep (without closing VS Code)
3. Wake computer
4. Previous session conversation data is lost

## Requested Fixes
1. Implement incremental session persistence (save after each turn)
2. Add user warnings before potential data loss events
3. Implement session recovery for interrupted sessions
4. Document current limitations clearly
5. Consider local backup/autosave for active sessions

## Workspace Storage Path (for Microsoft investigation)
`C:\Users\sidpr\AppData\Roaming\Code\User\workspaceStorage\ae8e9dfbff19a1328a7c1e444c11e703\GitHub.copilot-chat\`

---

This is unacceptable quality for a paid service and needs urgent attention.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.