Skip to content

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

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

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
Contributor

hora7ce commented May 28, 2026

Related with #63

@san360 san360 self-assigned this May 29, 2026
@san360
Copy link
Copy Markdown
Contributor

san360 commented May 31, 2026

Closing as duplicate of #63. Consolidating discussion and fixes there to keep one source of truth.

@san360
Copy link
Copy Markdown
Contributor

san360 commented May 31, 2026

@VSydorenko marking this as duplicate of #63 and closing to keep tracking in one PR thread.

@san360
Copy link
Copy Markdown
Contributor

san360 commented May 31, 2026

Closing this PR as duplicate of #63.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

4 participants