Skip to content

fix: use correct path encoding for Cursor session-context on Windows#181

Merged
rhuanbarreto merged 1 commit intomainfrom
fix/cursor-windows-path-encoding
Mar 30, 2026
Merged

fix: use correct path encoding for Cursor session-context on Windows#181
rhuanbarreto merged 1 commit intomainfrom
fix/cursor-windows-path-encoding

Conversation

@rhuanbarreto
Copy link
Copy Markdown
Contributor

Summary

  • Cursor and Claude Code encode Windows drive-letter colons differently in their project directory names: Claude Code replaces : with - (C--Users-...) while Cursor strips them entirely (C-Users-...).
  • The shared encodeProjectPath only implemented the Claude Code scheme, so archgate session-context cursor always failed on Windows with No Cursor agent-transcripts directory found.
  • Added a target option (claude | cursor) to encodeProjectPath so each caller selects the correct encoding. Default remains claude (backward-compatible).

Test plan

  • All 30 existing + new tests pass (bun test)
  • 4 new tests cover Cursor-target encoding for Windows paths, mixed slashes, worktree paths, and Unix path equivalence
  • Manual: run archgate session-context cursor on Windows and verify it finds the agent-transcripts directory

Made with Cursor

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 30, 2026

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 496c669
Status: ✅  Deploy successful!
Preview URL: https://ba3076d6.archgate-cli.pages.dev
Branch Preview URL: https://fix-cursor-windows-path-enco.archgate-cli.pages.dev

View logs

@rhuanbarreto rhuanbarreto force-pushed the fix/cursor-windows-path-encoding branch 2 times, most recently from 274b3a6 to ba7e57f Compare March 30, 2026 13:36
Cursor strips drive-letter colons (C:\ -> C-Users-...) while Claude
Code replaces them with dashes (C:\ -> C--Users-...). The shared
encodeProjectPath only implemented the Claude Code scheme, causing
"No Cursor agent-transcripts directory found" on Windows.

Add a target option so each caller selects the right encoding.

Made-with: Cursor
@rhuanbarreto rhuanbarreto force-pushed the fix/cursor-windows-path-encoding branch from ba7e57f to 496c669 Compare March 30, 2026 13:40
@rhuanbarreto rhuanbarreto enabled auto-merge (squash) March 30, 2026 13:43
@rhuanbarreto rhuanbarreto merged commit 9e531ee into main Mar 30, 2026
9 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/cursor-windows-path-encoding branch March 30, 2026 13:44
@github-actions github-actions bot mentioned this pull request Mar 30, 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.

1 participant