Skip to content

AI Extension #1663

@etisesh

Description

@etisesh

Type: Bug

Bug Report: GitHub Copilot Chat - Chat History Not Persisting

Date: February 17, 2026
Extension: GitHub Copilot Chat v0.37.6
VS Code Version: 1.109.4 (c3a26841a84f20dfe0850d0a5a9bd01da4f003ea, arm64)
Platform: macOS


Summary

Chat sessions are created and appear in the history panel, but when clicked, they fail to load any content beyond the initial message. Investigation reveals that conversation data is not being persisted to disk properly.


Symptoms

  1. Chat history appears in sidebar - Multiple chat sessions are listed
  2. Clicking a chat loads nothing - Only shows initial user message, no responses
  3. Active sessions work fine - Current conversations display correctly during the session
  4. Data lost on reload - After closing and reopening chats, conversation content is missing

Root Cause Analysis

Expected Behavior

The extension should persist full conversation history to .jsonl files:

~/Library/Application Support/Code/User/workspaceStorage/{workspace-id}/chatSessions/{session-id}.jsonl

Each line in the .jsonl file should be a JSON object with kind: 0 containing the full session state including all requests/responses.

Actual Behavior

  1. Minimal persistence: Only the first user message is saved to .jsonl files
  2. Incomplete updates: Files contain multiple lines with kind: 1 (incremental updates) but the last kind: 0 entry only has 1 request
  3. No conversation recovery: Subsequent messages in the conversation are never written to disk

Evidence

File Structure

# Chat sessions directory
~/Library/Application Support/Code/User/workspaceStorage/62d2032e87eaf31c7e5ce7e14dc523b9/chatSessions/

Example Session Analysis

Session ID: 7f4a4993-e35e-491e-ad39-59f26788c662

File stats:

$ wc -l chatSessions/7f4a4993-e35e-491e-ad39-59f26788c662.jsonl
29 lines

$ grep '"kind":0' chatSessions/7f4a4993-e35e-491e-ad39-59f26788c662.jsonl | tail -1 | \
  jq '.v.requests | length'
1  # Only 1 request saved despite having 4+ exchanges

What's saved:

  • Line 1: kind: 0 - Initial session state with first user message ✓
  • Lines 2-29: kind: 1 - Incremental updates (cursor positions, selections) ✓
  • Missing: Subsequent conversation exchanges ✗

Editing Sessions

The editing session folder exists and tracks file operations but NOT conversation content:

~/Library/Application Support/Code/User/workspaceStorage/62d2032e87eaf31c7e5ce7e14dc523b9/chatEditingSessions/7f4a4993-e35e-491e-ad39-59f26788c662/

state.json         # 205KB - tracks 417 operations
contents/          # Contains file edit operations only

Note: state.json has 417 timeline operations, but these are file editing operations, not conversation text.


Impact

Data Loss

  • Today (Feb 17): Created ~32 chat editing sessions
  • Persistent sessions: Only 3 .jsonl files created
  • Saved conversations: Only 1 request per file (first message only)
  • Lost data: All assistant responses and follow-up exchanges

Scale of Issue

Across 5 workspace folders:

  • 34 total chat sessions found
  • 15+ sessions with 0 exchanges saved (empty or first-message-only)
  • Largest affected session: 6.9MB .jsonl file exists but conversation incomplete

Reproduction Steps

  1. Open VS Code with GitHub Copilot Chat extension
  2. Start a new chat session
  3. Have multiple back-and-forth exchanges (5+ messages)
  4. Close the chat panel
  5. Reopen VS Code or click the chat in history
  6. Expected: Full conversation loads
  7. Actual: Only first user message appears

Diagnostic Commands

Check your own sessions:

# Find your workspace storage
cd ~/Library/Application\ Support/Code/User/workspaceStorage

# List all chat sessions
find . -path "*/chatSessions/*.jsonl" -exec ls -lh {} \;

# Check a specific session for saved requests
SESSION_FILE="path/to/session.jsonl"
grep '"kind":0' "$SESSION_FILE" | tail -1 | jq '.v.requests | length'

# Should show multiple requests, but likely shows only 1

Workaround

Until fixed, manually preserve important conversations:

  1. Copy text manually from active chat window
  2. Take screenshots of important exchanges
  3. Use alternative Claude interfaces for critical work:
    • claude.ai web interface
    • Claude API directly
    • Other Claude Code-compatible editors

Technical Details

File Format Analysis

Correct .jsonl structure:

{
  "kind": 0,
  "v": {
    "version": 3,
    "sessionId": "...",
    "requests": [
      { "requestId": "...", "message": {...}, "response": {...} },
      { "requestId": "...", "message": {...}, "response": {...} },
      ...
    ]
  }
}

What's actually saved:

  • Initial kind: 0 with 1 request ✓
  • Multiple kind: 1 updates with UI state ✓
  • No updated kind: 0 with additional requests

Empty State Files

Many editing session state.json files found with 0 bytes:

$ wc -l chatEditingSessions/*/state.json
0 state1.json
0 state2.json
...

This indicates the extension is creating folder structure but failing to write session data.


System Information

# Extension version
$ code --list-extensions --show-versions | grep copilot
[email protected]

# VS Code version
$ code --version
(run this command and include output)

# macOS version
$ sw_vers
ProductName:    macOS
ProductVersion: (your version)

Logs

Check for errors in VS Code Output panel:

  1. View → Output
  2. Select "GitHub Copilot" from dropdown
  3. Look for errors related to persistence/storage

Common error patterns to look for:

  • JSON serialization errors
  • File write permission errors
  • Storage quota errors

Requested Fix

  1. Immediate: Ensure ALL conversation exchanges are written to .jsonl files
  2. Validation: Extension should verify persistence after each exchange
  3. Error handling: Log errors when persistence fails (currently silent failure)
  4. Recovery: Provide mechanism to export/recover in-memory chat sessions before close
  5. Notification: Warn users if conversation data fails to persist

Additional Context

  • Issue appears to be recent (older chats from Feb 5-12 have full content)
  • May be related to recent extension update
  • Affects multiple workspace configurations
  • Silent failure - no error messages to user

How to Submit This Report

Option 1: VS Code Built-in Bug Reporter

  1. In VS Code: Help → Report Issue
  2. Select "GitHub Copilot Chat" as the extension
  3. Copy/paste relevant sections from this report
  4. Include diagnostic command outputs

Option 2: GitHub Issues

  1. Visit: https://github.com/microsoft/vscode-copilot-release/issues
  2. Check for existing reports on chat persistence
  3. Create new issue if none exist
  4. Include reproduction steps and diagnostic data

Option 3: Extension Marketplace

  1. Go to extension page in VS Code
  2. Click "Report Issue" link
  3. Follow their bug report template

Attachments

Include with bug report:

  • VS Code version output
  • Extension version
  • Sample .jsonl file (sanitized)
  • Output logs showing errors
  • Screenshots of empty chat history

Priority: HIGH - Data loss bug affecting all conversations

VS Code version: Code 1.109.4 (Universal) (c3a26841a84f20dfe0850d0a5a9bd01da4f003ea, 2026-02-16T15:35:57.932Z)
OS version: Darwin arm64 24.6.0
Modes:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type:CustomerSupportProblem recognized as a customer support case

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions