Skip to content

Native Windows launch portability for spawned CLIs #83

@nillo

Description

@nillo

Problem

ContextRelay launches external CLIs directly with Node/Bun spawn/execFileSync. On native Windows, npm-installed tools such as codex, claude, git, and tmux are resolved as .cmd shims, which direct spawn/execFileSync calls do not execute the same way as real binaries. This can fail ctxrelay claude/codex/pair on native Windows.

Evidence

  • src/cli/claude.ts:58
  • src/cli/codex.ts:203
  • src/cli/codex.ts:250
  • src/codex-adapter.ts:185
  • src/codex-adapter.ts:197
  • src/codex-adapter.ts:706

Candidate fixes

  • Resolve commands through PATHEXT on win32 and execute the resolved .cmd/.exe safely, or
  • Use shell:true with windowsHide:true only on win32, with explicit argument-quoting tests.

Validation needed

  • Add Windows CI coverage for the launch paths.
  • Run a real native-Windows smoke for ctxrelay claude, ctxrelay codex, and ctxrelay pair.

Notes

v1.2.1 documents macOS/Linux/WSL support and leaves native-Windows launch portability as this follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions