You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: command overrides with native absolute paths are corrupted by POSIX backslash tokenization #11375
Custom agent command overrides are parsed by tokenizeCustomCommandTemplate() (src/shared/commit-message-prompt.ts), which applies POSIX shell backslash-escape semantics on every platform. On Windows this silently destroys native absolute paths, since \ is the path separator rather than an escape character.
Reproduction
Enter a normal Windows absolute path as an agent command override in Settings:
The same treatment applies inside double quotes. The tokenizer is otherwise a reasonable POSIX-style splitter; the problem is that it is platform-unaware.
Workaround
Replace backslashes with forward slashes in the override. This works but is not discoverable, and Windows Settings should accept paths in the form users actually copy from Explorer or where.exe.
Notes on a fix
Backslash handling needs to become platform-aware rather than being removed outright — quoting behaviour is shared with POSIX hosts, and the same override string can target a WSL distro or a remote SSH host, where POSIX semantics remain correct. The platform that matters is the one the command will execute on, not necessarily the one running the UI. Test coverage should include native Windows absolute paths, quoted paths containing spaces, and existing POSIX escape cases.
Impact
Currently blocks the only known working workaround for #11374, since that workaround requires entering an absolute powershell.exe path as an override.
Scope note
Deliberately split out of #10190, which is scoped to Cursor CLI detection. This bug is independent of Cursor and affects any Windows command override.
I'd like to take this. I'll add a failing regression for native Windows absolute-path command overrides, then make tokenization execution-platform-aware while preserving the existing POSIX semantics for WSL and SSH targets. I'll keep the change scoped to command parsing and its callers.
Activity
bbingz commentedon Jul 29, 2026
I'd like to take this. I'll add a failing regression for native Windows absolute-path command overrides, then make tokenization execution-platform-aware while preserving the existing POSIX semantics for WSL and SSH targets. I'll keep the change scoped to command parsing and its callers.
fix(commit-message): keep Windows paths intact in agent command overr…
fix(commit-message): keep Windows paths intact in agent command overr…
fix(commit-message): keep Windows paths intact in agent command overr…
fix(commit-message): keep Windows paths intact in agent command overr…