Remote project folder binding fails when stored paths contain doubled separators
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Problem
Managed remote-project paths can be persisted with doubled path separators, for example:
/Users/me/org//some-project
C:\Users\me\org\\some-project
Remote still shows the chat, but project folder binding fails because the stored path does not match the real directory (.../org/some-project).
This can happen when an org/workspace prefix that already ends with a separator is joined to a project name that already starts with one.
Expected
- Normalize stored project paths (
project_roots.path) and thread working directories (threads.cwd) on write by collapsing redundant/and\\. - Preserve a leading UNC/network prefix (
//or\\\\). - Backfill existing bad rows so already-created remote projects bind again.
Actual
Doubled separators are stored as-is. Remote can list the thread, but folder binding/lookup against the real path fails.
Suggested fix
Rewrite // (and equivalent mixed / \\ runs) at the SQLite write boundary, and add a migration that normalizes existing project_roots.path and threads.cwd values.
Proposed implementation: RaviTharuma/codex branch cursor/normalize-remote-path-slashes-78bc (compare against openai/codex).
Supersedes #43242 (created with an incomplete body due to a token permission limit on issue updates).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SQLite write boundary and inspect how project_roots.path and threads.cwd are stored. Compare the proposed cursor/normalize-remote-path-slashes-78bc branch with openai/codex, then add the migration that backfills existing rows. Done means redundant separators are normalized while leading UNC prefixes remain intact and remote folder binding works again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sqlite
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100