microsoft / microsoft/vscode

Cloud Session Sync

Open
#327,396 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Type: Bug

**Date:** 2026-07-24
**Filed by:** Matthew (via Copilot agent analysis)
**Product:** GitHub Copilot Chat (VS Code extension)
**Copilot versions observed:** 0.57.0 → 0.58.0
**VS Code versions observed:** 1.129.1 → 1.130.0
**OS:** Linux (remote server — VS Code Server)
**Extension:** `GitHub.copilot-chat`

---

## Symptoms

Sessions are saved reliably to the **local** session-store.db and transcript files, but the **cloud search index is stale** — the latest cloud-visible session is 16+ hours old. Newer sessions have cloud IDs assigned but their content never appears in `session_store_sql` (chronicle) cloud queries.

## Evidence

### Cloud registration succeeds; content upload fails

The file `cloudSessions.json` (at `globalStorage/github.copilot-chat/cloudSessions.json`) maps local session IDs to cloud IDs — registration works. But querying the cloud session store by those cloud session IDs returns no results.

| Local session | Created (UTC) | Cloud session ID | Cloud search visible? |
|---|---|---|---|
| `c1c27eca-...` (baseline) | 2026-07-23 23:10 | `f88613ab-...` | ✅ Yes |
| `5f025a34-...` | 2026-07-24 10:19 | `0d0bc8e0-...` | ❌ No |
| `73f2ff31-...` | 2026-07-24 15:02 | `73989ff6-...` | ❌ No |

### All data exists locally

- Full transcripts: `transcripts/.jsonl` (79 KB – 631 KB each)
- Full turned data: `session-store.db` (turns, search_index FTS, sessions tables)
- `chat.sessionSync.enabled = true`
- `github.copilot.chat.localIndex.enabled = true`

### No errors in logs

Scanned both VS Code extension host sessions' Copilot Chat logs (`20260724T061610` and `20260724T105501`) — zero sync-related errors, warnings, or HTTP failures (no 401/403/500, no auth errors, no timeout messages).

### Some local sessions never even got registered

5 sessions exist in the local `session-store.db` but have zero entry in `cloudSessions.json` — they were never registered in the cloud at all, despite being locally indexed for days.

## Suspected Root Cause

The sync is a two-phase process:

1. **Registration** — creates cloud session via RPC, persists mapping to `cloudSessions.json`
2. **Content upload** — buffers turn events and flushes on a safety timer (`this._scheduleFlush`)

If the extension host restarts (e.g. VS Code window reload, remote server reconnect) before the safety-timer flush fires, the **in-memory event buffer is lost**. The cloud has a session stub (from step 1) but the content never arrives.

A `session_store reindex` re-triggers step 1 (pushing any unregistered local sessions to the cloud) but does **not** appear to re-push buffered content from step 2 for already-registered sessions.

## Attachments

- `session-store.db` — local SQLite session store (contains sessions + turn index; no conversation text in sessions table)
- `cloudSessions.json` — local-to-cloud ID mapping (included inline above)

## Submission Channels

- **VS Code:** `Help → Report Issue` opens the issue reporter
- **GitHub:** https://github.com/orgs/community/discussions/categories/copilot
- **Session sync docs:** https://aka.ms/vscode-copilot-session-sync
- **Copilot agents dashboard:** https://github.com/copilot/agents

## Questions for Support

1. Is the sync indeed a two-phase (registration → content upload) model?
2. What is the safety-flush timer interval? Does it survive extension host restarts?
3. Is there a way to manually trigger content re-upload for already-registered cloud sessions?
4. Can error logging be added when content upload fails (currently silent)?

VS Code version: Code 1.130.0 (1b6a188127eeaf9194f945eb6eb89a657e93c54c, 2026-07-22T14:55:04Z)
OS version: Linux x64 7.0.0-28-generic snap
Modes:
Remote OS version: Linux x64 6.17.0-35-generic

System Info

|Item|Value|
|---|---|
|CPUs|13th Gen Intel(R) Core(TM) i7-13700H (20 x 1643)|
|GPU Status|2d_canvas: disabled_software
GPU0: VENDOR= 0x0000, DEVICE=0x0000
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: disabled_off
webgpu: disabled_off
webgpu_on_vk_via_gl_interop: disabled_off
webnn: disabled_off|
|Load (avg)|1, 0, 0|
|Memory (System)|7.44GB (4.22GB free)|
|Process Argv|--no-sandbox --force-user-env --ozone-platform=x11 --crash-reporter-id d4c2e512-89ed-4558-a5c9-dac08e45586b --crash-reporter-id d4c2e512-89ed-4558-a5c9-dac08e45586b|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|ubuntu|
|XDG_CURRENT_DESKTOP|ubuntu:GNOME|
|XDG_SESSION_DESKTOP|ubuntu|
|XDG_SESSION_TYPE|wayland|

|Item|Value|
|---|---|
|Remote|SSH: matthew-Precision-5490|
|OS|Linux x64 6.17.0-35-generic|
|CPUs|Intel(R) Core(TM) Ultra 9 185H (18 x 400)|
|Memory (System)|30.80GB (20.75GB free)|
|VM|0%|
Extensions (14)

Name|Identifier|Author|Version
---|---|---|---
Python Debugger|ms-python.debugpy|ms-python|2026.6.0
Python|ms-python.python|ms-python|2026.4.0
Pylance|ms-python.vscode-pylance|ms-python|2026.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.36.0
Ollama|ollama.ollama|Ollama|0.0.5
Cline|saoudrizwan.claude-dev|saoudrizwan|4.0.11
DeepSeek V4 for Copilot Chat|vizards.deepseek-v4-for-copilot|Vizards|0.6.2
GitHub Repositories|github.remotehub|GitHub|0.64.0
Dev Containers|ms-vscode-remote.remote-containers|ms-vscode-remote|0.466.0
Remote - SSH|ms-vscode-remote.remote-ssh|ms-vscode-remote|0.124.0
Remote - SSH: Editing Configuration Files|ms-vscode-remote.remote-ssh-edit|ms-vscode-remote|0.87.0
Azure Repos|ms-vscode.azure-repos|ms-vscode|0.40.0
Remote Explorer|ms-vscode.remote-explorer|ms-vscode|0.5.0
Remote Repositories|ms-vscode.remote-repositories|ms-vscode|0.42.0

A/B Experiments

```
vsliv368cf:30146710
vswsl492:30256859
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
b6b4d950:31327385
envsactivate1:31551504
gh487529:31544284
cloudbuttont:31379625
42190218_ostrepl:31403339
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
ge8j1254_inline_auto_hint_haiku:31490510
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
c9b86496:31447327
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31518289
7e187181:31503455
i2gc6536:31499202
52612955:31516516
ghj88844:31499326
ddid_t:31478206
hmra_i5g22:31518061
ja75b849_copy:31554124
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
748c7209:31512887
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
f9bf7985:31543584
a1ije391_t:31540920
hgf2d445:31529595
8hfba999:31537718
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
jf4hg949:31526829
nes-curr-leftover-1500:31538366
8hjh2968:31555644
h561g132:31533256
sessions_5:31532894
chatquotatrajectorynudge-control:31548766
ihg5j128:31534457
f412h606:31551416
9gg7f176:31542112
sandbox-ui-on-2:31543161
5fe6f778:31554331
allow-none:31555437
fd5dc207:31551400
nes-gb3-nf-6k:31554346
1532g621_copy:31554320
d4c76da2:31554780
treatment-23-1:31555779
unuse_dynamic_mcp:31555281

```

Contributor guide

Open the contributing guide

Research direction

Start by comparing cloudSessions.json with session-store.db and the transcript files for registered and unregistered sessions. Trace the reported registration and content-upload phases around _scheduleFlush, then inspect the Copilot Chat extension logs for missing failure reporting. Done means sessions survive extension-host restarts with searchable cloud content, and failed uploads are observable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cloud
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.