Repository navigation
Description
Status quo
Native Windows does not work today: afx tower start hangs in its readiness wait because the daemon fails during startup (field-tested 2026-09-09). CI covers Ubuntu and macOS only. WSL2 is the supported path and works end to end (verified same day: build-essential + python3, Node 22 via nvm, npm install -g @cluesmith/codev); the practical setup is ~three commands.
This issue is a tracking/research map for what NATIVE Windows support would take — filed to capture the analysis, not as a commitment to build it.
The map, by depth of surgery
- Shellper transport (hard core). Persistent sessions ride Unix domain sockets (
ShellperClient→*.sockpaths). Windows equivalent is named pipes, which Node'snetsupports — a transport abstraction (platform-specific endpoint resolution; HELLO/WELCOME framing unchanged). Owner-only socket permissions become pipe ACLs. Everything downstream depends on this: no shellper, no persistent builders, no detached-survival semantics. - Process lifecycle. POSIX process groups + SIGTERM→SIGKILL escalation (
PtySession.kill, dev-PTY tree teardown) need Job Objects ortaskkill /Tbranches. The load-bearing "detached shellpers survive a Tower restart" guarantee must be re-proven under Windows process semantics. - The forge layer — the architectural fork. Every forge concept is a shell script (18+ concepts × providers), builders launch via generated bash
.builder-start.sh,postSpawnassumessh. Options: (a) PowerShell twins (doubles maintenance forever), (b) require Git-Bash and route script execution through it (pragmatic; adds a dependency + path-translation quirks), (c) rewrite concepts as Node code (best long-term, biggest one-time cost, framework change hitting codev-skeleton). This decision shapes everything downstream and deserves its own spec if the project proceeds. - node-pty / ConPTY. Ships Windows support; render gate consumes byte streams so the mirror/classifier should carry over — but echo/resize/exit timing differences are exactly the assume-nothing class (afx send: delivery-side silent truncation of long bodies (head-loss can invert meaning) — needs integrity check before Enter #1567's lesson). Gate profiles need Windows-terminal validation captures.
- POSIX residue (wide, shallow). Hardcoded
/tmp(test utils at minimum),~expansion, local-key file modes, symlink-based runnable-worktrees (needs Windows Developer Mode), CLI-side opener branches (the VS Code extension already branches for Explorer). - Windows CI leg — the ongoing tax. windows-latest for unit/integration/e2e plus a stabilization period; without it support rots in weeks. This recurring cost outlives the build-out.
Shape and go/no-go
SPIR-scale, multi-phase: audit → transport + lifecycle → forge-layer decision → script generation → CI leg.
Go/no-go criterion: demand from environments where WSL2 is administratively blocked (locked-down corporate IT) — the only user segment native support unlocks that WSL2 doesn't already serve. Absent that demand, the recommendation is to keep WSL2 as the documented Windows path.
Near-term docs follow-up (independent of this project)
Install docs should state: Linux/WSL needs build-essential + python3 (node-pty compiles from source on Linux), Node ≥ 20 (22 recommended), and Windows users should use WSL2.
Activity
amrmelsayed commentedon Oct 11, 2026
Architect ruling (2026-10-12): protocol + forge-layer decision
Protocol: SPIR. Owner-confirmed.
Forge layer: Git Bash is a hard requirement on native Windows. No script rewrite. Owner ruling.
Verified in source before ruling:
packages/codev/scripts/forge/{github,gitlab,...}) are#!/bin/sh, POSIX-clean (the tower: overview cache burns the user's entire GitHub GraphQL quota (3 gh calls × N workspaces every 30s, failures uncached) — every gh command on the machine then fails #1645 pipefail note shows they already avoid bashisms). Their external tools aregh/glab/jq/curl/git/printf/sed/head/grep/tail/sort/date. Git for Windows ships bash, sed, grep, head, tail, sort, date, curl and git.gh/glabare separate installs on every platform already.jqis the one tool Git Bash does not ship (78 call sites): it becomes a documented Windows prerequisite and acodev doctorcheck.packages/codev/src/lib/forge.ts:442runs concepts viaexecSync(command), which on Windows defaults tocmd.exeand cannot execute a shebang script.packages/codev/src/agent-farm/commands/spawn.ts:703starts every builder as/bin/bash .builder-start.sh(hardcoded absolute path).worktree.postSpawnhooks run through the system shell.So items 3(a) PowerShell twins and 3(c) Node port in the map above are off the table. The forge-layer phase collapses to: resolve the Git Bash binary (standard install path, then PATH), route the three launch sites through it, handle Windows-path to bash-path translation for
cwdand script arguments, addjq+ Git Bash to doctor, and document both as prerequisites.Decisions still open for the owner (spec-gate points): scope = full parity vs first cut; Windows CI leg commitment; default spawned shell for architect/builder terminals (Git Bash is the natural answer given this ruling, but it is the terminal the user lives in, so it is the owner's call); one SPIR with phases vs parent spec + child lanes.
amrmelsayed commentedon Oct 11, 2026
Architect ruling (2026-10-12, part 2): remaining spec-gate points settled
Owner decisions, in addition to SPIR + Git Bash hard requirement above:
.codev/config.json). Git Bash is the only plumbing shell: forge concepts, the builder launch script, postSpawn. No PowerShell twins of any script. Rationale: mirrors Claude Code's own ordering (Git Bash for its Bash tool, PowerShell for the human), avoids doubling the 56-script surface, and sidesteps PowerShell execution-policy restrictions on locked-down machines (the segment this work targets).bash: the System32bash.exelaunches WSL. Spawn should set or honor Claude Code'sCLAUDE_CODE_GIT_BASH_PATHso builders and codev agree on one binary.codev doctor(including a CRLF warning for user-authored postSpawn scripts). WSL 2 stays a documented, supported alternative; docs present native + Git Bash and WSL 2 as two paths.Known Windows-specific items the spec must address (from the Git Bash analysis): MSYS path translation on arguments (per-call opt-out), signals not crossing the bash/native boundary (Job Objects or taskkill at the four process-group kill sites), symlink fallback for runnable worktrees when Developer Mode is off, ConPTY render-gate validation captures.
Spawn:
afx spawn --protocol spir 1658, pending the owner's word.release notes: native Windows (preview) (#1658, PR #1859)