Skip to content

fix: match WSL session list cwd casing - #1053

Open
kocaemre wants to merge 1 commit into
agentclientprotocol:mainfrom
kocaemre:fix/wsl-cwd-session-list
Open

fix: match WSL session list cwd casing#1053
kocaemre wants to merge 1 commit into
agentclientprotocol:mainfrom
kocaemre:fix/wsl-cwd-session-list

Conversation

@kocaemre

Copy link
Copy Markdown

Summary

  • normalize /mnt/<drive>/... cwd filters before calling the Claude SDK session index
  • keep non-WSL paths case-preserving
  • add session/list coverage for the WSL drive-path case

Fixes #1041

Verification

  • npm run test:run -- src/tests/acp-agent.test.ts -t 'session/list'
  • npm run test:run -- src/tests/acp-agent.test.ts
  • npm run build
  • npm run check
  • git diff --check

I also ran npm run test:run; it reached 1044 passed, 27 skipped and failed only the two existing root-environment resolvePermissionMode expectations where bypassPermissions is downgraded to default when tests run as root.

@kocaemre
kocaemre force-pushed the fix/wsl-cwd-session-list branch from f340123 to ade811c Compare September 7, 2026 04:50
@kocaemre

kocaemre commented Sep 7, 2026

Copy link
Copy Markdown
Author

Rebased this PR onto current main after the branch became conflicting (DIRTY). The only conflict was in src/tests/acp-agent.test.ts; I kept the newer upstream importSessionToStore fork-session test setup and the PR's listSessions mock/session-list tests together.

Validation on the refreshed branch:

  • npm ci — passed (248 packages installed, 0 vulnerabilities)
  • npm run test:run -- src/tests/acp-agent.test.ts -t 'session/list' — passed (2 passed, 493 skipped)
  • npm run build — passed (tsc)
  • npm run check — passed (eslint + prettier --check)
  • git diff --check origin/main..HEAD — passed

I also ran the full npm run test:run; it reached 1230 passing / 27 skipped, but failed 6 tests outside this PR's touched behavior: three timeouts in existing suites, the two known root-environment resolvePermissionMode expectations, and one hook timeout in session-config-options. The targeted session/list, build, lint, and format checks above are green after the rebase.

Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com>
@kocaemre
kocaemre force-pushed the fix/wsl-cwd-session-list branch from ade811c to 9fa0b1f Compare September 7, 2026 19:36
@kocaemre

kocaemre commented Sep 7, 2026

Copy link
Copy Markdown
Author

Rebased this PR onto current main (d870ebd2) after upstream moved and force-pushed refreshed head 9fa0b1f.

No code changes beyond replaying the existing WSL cwd normalization commit on top of the current branch.

Local verification in this cron environment:

git diff --check origin/main..HEAD
# passed

npm run test:run -- src/tests/acp-agent.test.ts -t 'WSL|session list cwd casing|non-WSL cwd filters'
# passed: 2 tests, 493 skipped

npm run check
# passed: eslint src --ext .ts + prettier --check .

npm run build
# passed: tsc

I also tried the broader file-level suite:

npm run test:run -- src/tests/acp-agent.test.ts

It ran 495 tests and passed 485 with 9 skipped, but timed out in the pre-existing broad-suite test stop reason propagation > forwards background output that arrives after the turn resolves (issue #679). The focused WSL regression tests for this PR passed after the rebase.

DCO sign-off is preserved on the PR commit.

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.

session/list matches cwd case-sensitively, so a session created with a /mnt/<drive> path cannot be found with that same path

1 participant