Skip to content

feat: add VS Code Remote SSH / vscode-server Copilot session support#80

Open
VSydorenko wants to merge 1 commit into
microsoft:mainfrom
VSydorenko:feat/vscode-remote-ssh-copilot-support
Open

feat: add VS Code Remote SSH / vscode-server Copilot session support#80
VSydorenko wants to merge 1 commit into
microsoft:mainfrom
VSydorenko:feat/vscode-remote-ssh-copilot-support

Conversation

@VSydorenko
Copy link
Copy Markdown

Problem

When using VS Code Remote SSH, Copilot Chat session data lives on the remote server at ~/.vscode-server/data/User/workspaceStorage/. The extension only searched ~/.config/Code/User/workspaceStorage/ (local path), so all Copilot sessions were invisible on Remote SSH setups.

Additionally, newer VS Code versions (April 2026+) write sessions in two new formats not previously parsed:

  • Transcripts: GitHub.copilot-chat/transcripts/<sessionId>.jsonl (events format)
  • Debug-logs: GitHub.copilot-chat/debug-logs/<sessionId>/main.jsonl (spans format)

The old chatSessions/ directory is no longer populated on these newer versions.

Changes

src/core/parser-vscode.ts

  • findVsCodeDirs(): Added ~/.vscode-server and ~/.vscode-server-insiders paths for Remote SSH support.
  • harnessFromPath(): Fixed — .vscode-server paths now return 'Copilot' instead of 'Local Agent'.
  • processWorkspaceEntry/Async(): Added parsing for transcripts and debug-logs with deduplication.

src/core/parser-debug-logs.ts (new file)

Parser for the Copilot Chat span format. Each main.jsonl line is a span: session_start, user_message, llm_request, tool_call, agent_response, turn_end.

src/webview/panel-llm.ts

  • Added Claude/o4-mini to model fallback list in selectModel()
  • Clear modelOptions on JSON parse failure to disable structured output before retrying

Result

Before: 0 Copilot sessions on Remote SSH.
After: 172 sessions loaded, all 3 harnesses visible in the dashboard.

- Add ~/.vscode-server and ~/.vscode-server-insiders paths to findVsCodeDirs()
  so the extension detects sessions from VS Code Remote SSH servers, not only
  local installations.

- Fix harnessFromPath() to return 'Copilot' for .vscode-server paths (was
  classified as 'Local Agent', hiding Copilot sessions from charts).

- Add new parser-debug-logs.ts that handles the Copilot Chat debug-logs span
  format (GitHub.copilot-chat/debug-logs/<sessionId>/main.jsonl), which is the
  primary session source on newer VS Code versions (April 2026+).

- Add transcript parsing for GitHub.copilot-chat/transcripts/<sessionId>.jsonl
  (events format, similar to CLI) so sessions from both transcript and debug-log
  formats are loaded with deduplication.

- Improve LLM fallback in panel-llm.ts: add Claude/o4-mini families to
  selectModel() and reset modelOptions on first JSON parse failure so the next
  retry uses plain-text mode instead of structured output.
@VSydorenko
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@hora7ce
Copy link
Copy Markdown

hora7ce commented May 28, 2026

Related with #63

@san360 san360 self-assigned this May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants