Skip to content

[Cross-Ref] Windows Path Handling — Universal Pain Point Across All CLIs #1

@howardpen9

Description

@howardpen9

Pattern

Windows path handling (spaces in usernames, EEXIST errors, PowerShell subprocess issues) is a universal pain point across all three major coding CLIs.

Occurrences

Claude Code

  • 20+ open issues related to Windows
  • #31418 — Hangs on startup when username contains spaces (EEXIST)
  • #31465 — Bash tool broken when username contains apostrophe
  • #31453 — Write tool fails with EEXIST on Windows
  • #31460 — EEXIST mkdir when target dir exists
  • #31398 — EEXIST file already exists on startup

OpenCode

  • #16342 — Symbolic links not recognized on Windows 11
  • #16336 — Snapshot occupies huge storage on Windows
  • #16314, #16321 — Trojan false positive on Windows

Kimi CLI

  • #1341 — PowerShell subprocess handling bug
  • #1343 — Slow startup on Windows via uv install

Analysis

The root cause is consistent: CLI tools assume Unix-like path behavior. Key failure modes:

  1. mkdir with {recursive: true} still throws EEXIST on Windows race conditions
  2. Usernames with spaces/apostrophes break shell escaping
  3. PowerShell has different quoting rules than bash/zsh
  4. Windows file locking causes unexpected EACCES

Recommended Solution

  • Use platform-aware path normalization (no hardcoded /)
  • Wrap mkdir with EEXIST retry/ignore
  • Test username edge cases: spaces, apostrophes, unicode, CJK characters
  • PowerShell: use -Command flag, avoid single quotes for variable interpolation

Contribution Target

Kimi CLI — Python's pathlib makes cross-platform path handling cleaner than Node.js. Fix #1341 with proper PowerShell subprocess handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions