Skip to content

Windows support: unblock the POSIX-only assumptions #231

Description

@raysonmeng

Goal

AgentBridge currently runs on macOS and Linux only; the README states Windows is not officially supported. This tracks making Windows a first-class platform. The codebase is already partly platform-aware (port cleanup has a win32 path, issue #76), so this is about closing the remaining POSIX-only gaps, not a rewrite.

Known blockers (from a source scan)

  1. Unix-domain-socket transportsrc/codex-transport.ts falls back to a unix:// socket (<tmp>/agentbridge-<uid>/codex-<port>.sock) for Codex builds that dropped ws:// listen support. Windows has no AF_UNIX in Node the way POSIX does (path/net semantics differ). Needs a named-pipe (\\.\pipe\...) path or a forced-ws:// strategy on win32.

  2. Process-group signalssrc/process-lifecycle.ts uses -pid process-group kills and POSIX signals (SIGTERM/SIGKILL). Already guarded with process.platform !== "win32" in places, but the win32 branch needs a real termination path (taskkill /T) verified end to end, not just a no-op fallback.

  3. State directorysrc/state-dir.ts handles darwin (~/Library/Application Support) and Linux ($XDG_STATE_HOME), but has no Windows branch. Should use %LOCALAPPDATA% (fallback %APPDATA%).

  4. CI has no Windows gate for the full suite.github/workflows/ci.yml matrix is [ubuntu-latest, macos-latest]; only a narrow windows-port-cleanup job runs on windows-latest. Without a full Windows CI leg, regressions on win32 are invisible.

  5. Runtime / launcher on Windows — the bin shebang (#!/usr/bin/env bun) and the abg claude / abg codex launchers assume a POSIX shell + Bun on PATH. Needs verification that Bun + the plugin host + Codex CLI actually launch and attach on Windows (PowerShell / Windows Terminal), including any path-separator assumptions.

Suggested order

  1. State dir (%LOCALAPPDATA%) — smallest, unblocks daemon state.
  2. Transport: named pipe or force-ws:// on win32.
  3. Process termination via taskkill /T /F, verified.
  4. Add a full-suite windows-latest CI leg (expect it red first, then fix to green).
  5. End-to-end smoke: abg initabg claudeabg codex on Windows Terminal.

WSL2 likely works today (it's Linux) and can be documented as an interim path while native win32 lands.

Definition of done

  • Full test suite green on windows-latest in CI.
  • abg init / claude / codex complete a real pair on native Windows.
  • README limitation line removed; Windows listed as supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions