Skip to content

Conversation

@TylerLeonhardt
Copy link
Member

Copilot AI review requested due to automatic review settings January 30, 2026 02:16
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Jan 30, 2026
Copy link
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.

Pull request overview

Updates Claude session discovery to use the same project slug directory as the Claude SDK on Windows (derived from process.cwd()), instead of the hard-coded - directory, and adjusts unit tests accordingly.

Changes:

  • Use this._computeFolderSlug(URI.file(process.cwd())) for multi-root and no-workspace session directories.
  • Update claudeCodeSessionService.spec.ts to expect sessions under the process.cwd()-derived slug directory in no-workspace and multi-root scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/extension/agents/claude/node/claudeCodeSessionService.ts Switches multi-root/no-workspace session scanning from - to a process.cwd()-based slug.
src/extension/agents/claude/node/test/claudeCodeSessionService.spec.ts Updates tests to match the new session directory slug behavior for no-workspace and multi-root cases.

@@ -116,7 +116,7 @@ export class ClaudeCodeSessionService implements IClaudeCodeSessionService {
slugs.push(this._computeFolderSlug(folders[0]));
} else {
// Multi-root or no folder - add the no-project slug
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The comment says "Multi-root or no folder - add the no-project slug", but the code now derives the slug from process.cwd(). Please update the comment to match the current behavior (and/or rename "no-project" wording) to avoid misleading future readers.

Suggested change
// Multi-root or no folder - add the no-project slug
// Multi-root or no workspace folder - derive a slug from the current working directory

Copilot uses AI. Check for mistakes.
} else {
// Multi-root or no folder - add the no-project slug
slugs.push('-');
slugs.push(this._computeFolderSlug(URI.file(process.cwd())));
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

process.cwd() can throw (e.g., if the current working directory was deleted), which would make getAllSessions fail unexpectedly. Consider wrapping process.cwd() in a try/catch and falling back to a safe default (e.g., '-' or userHome) so session discovery remains resilient.

Copilot uses AI. Check for mistakes.
@TylerLeonhardt TylerLeonhardt added this pull request to the merge queue Jan 30, 2026
Merged via the queue into main with commit a6c4344 Jan 30, 2026
25 checks passed
@TylerLeonhardt TylerLeonhardt deleted the tyler/usual-galliform branch January 30, 2026 02:46
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.

Claude - Windows multi-root loading wrong path

3 participants