Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
There was a problem hiding this comment.
Pull request overview
Adds Windows support to the Entire CLI and its test harness by removing the tmux dependency, introducing native PTY session handling (ConPTY on Windows / PTY on Unix), and normalizing a few cross-platform path/line-ending behaviors.
Changes:
- Add
misetasks and documentation for Windows cross-compilation and usage. - Replace E2E interactive sessions from tmux to native PTY/ConPTY and refactor agent session startup accordingly.
- Improve cross-platform behavior (CRLF handling, Windows path normalization, pager default, Windows telemetry detachment implementation).
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
mise.toml |
Adds Windows cross-compile tasks (build:windows, build:windows-arm64). |
go.mod |
Adds github.com/UserExistsError/conpty for Windows ConPTY support. |
go.sum |
Updates sums for new ConPTY dependency and its indirect deps. |
e2e/tests/main_test.go |
Removes tmux preflight dependency; uses os.DevNull for Git config isolation. |
e2e/agents/tmux.go |
Removes tmux-backed session implementation. |
e2e/agents/pty_session.go |
Introduces cross-platform PTY session abstraction (capture/wait/send/close). |
e2e/agents/pty_session_unix.go |
Unix PTY implementation via creack/pty. |
e2e/agents/pty_session_windows.go |
Windows PTY implementation via ConPTY (conpty). |
e2e/agents/procattr_unix.go |
Adds Unix process-group setup helper for agent subprocess cleanup. |
e2e/agents/procattr_windows.go |
Adds Windows process-group setup helper for agent subprocess cleanup. |
e2e/agents/opencode.go |
Switches OpenCode sessions to PTY sessions. |
e2e/agents/gemini.go |
Uses shared setupProcessGroup; switches interactive session to PTY. |
e2e/agents/droid.go |
Uses shared setupProcessGroup; switches interactive session to PTY. |
e2e/agents/cursor_cli.go |
Switches Cursor CLI interactive session + helper signatures to PTY. |
e2e/agents/claude.go |
Uses shared setupProcessGroup; switches interactive session to PTY and simplifies env injection. |
cmd/entire/main.go |
Adjusts signal handling for cross-platform compilation (now interrupt-only). |
cmd/entire/cli/telemetry/detached_windows.go |
Adds Windows implementation for detached telemetry subprocess spawning. |
cmd/entire/cli/telemetry/detached_other.go |
Refines build tags to exclude Windows from the “other” implementation. |
cmd/entire/cli/strategy/manual_commit_hooks.go |
Normalizes CRLF in git output parsing for staged files. |
cmd/entire/cli/strategy/common.go |
Normalizes CRLF in line-splitting used for diff stats. |
cmd/entire/cli/paths/paths.go |
Normalizes git path output on Windows via filepath.FromSlash. |
cmd/entire/cli/integration_test/resume_test.go |
Uses detachFromTerminal helper; moves interactive tests behind unix build tags. |
cmd/entire/cli/integration_test/resume_interactive_test.go |
Adds unix-only interactive integration tests for resume prompts. |
cmd/entire/cli/integration_test/procattr_unix.go |
Adds unix-only detachFromTerminal helper. |
cmd/entire/cli/integration_test/procattr_windows.go |
Adds windows-only detachFromTerminal helper. |
cmd/entire/cli/integration_test/interactive.go |
Restricts interactive PTY test helpers to integration && unix. |
cmd/entire/cli/explain.go |
Defaults pager to more on Windows, less elsewhere. |
WINDOWS.md |
Adds Windows build/install/testing guidance and platform-specific notes. |
|
Perhaps we could also expand on the goreleaser settings to add windows as well. |
Cross-platform fixes informed by Buildkite agent patterns: - Remove syscall.SIGTERM (Unix-only) from main.go, use os.Interrupt only - Extract platform-specific process group setup (Setpgid/CREATE_NEW_PROCESS_GROUP) into build-tagged files for e2e agents and integration tests - Add CRLF-safe git output parsing (normalize \r\n before splitting) - Normalize git rev-parse paths with filepath.FromSlash for Windows - Default pager to 'more' on Windows instead of 'less' - Add Windows telemetry subprocess support (CREATE_NEW_PROCESS_GROUP) - Guard PTY-dependent integration tests with unix build tag - Add mise build:windows and build:windows-arm64 tasks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 12558d9fcbfc
Replace TmuxSession with PTYSession backed by creack/pty (Unix) and UserExistsError/conpty (Windows). This removes the tmux dependency so E2E tests can run on Windows and Linux without tmux installed. - Add pty_session.go with shared Send/WaitFor/Capture/Close/SendKeys - Add pty_session_unix.go using creack/pty - Add pty_session_windows.go using conpty (pure Go, no CGO) - Update all 5 agents to use NewPTYSession - Delete tmux.go - Fix main_test.go: remove tmux binary check, use os.DevNull Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 509a1d12a58f
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 178811f44dd2
Adds windows to the build matrix, overrides the archive format to zip for Windows, and configures a Scoop bucket for Windows package management. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Runs on windows-latest with schedule (6am UTC) and manual dispatch. Supports any agent via input, defaults to claude-code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace os.DevNull / hardcoded /dev/null with empty temp files for GIT_CONFIG_GLOBAL/SYSTEM (git on Windows cannot open NUL as config) - Replace /dev/null in core.hooksPath with empty temp directory - Drop "..." wildcard from E2E test package path to avoid Go toolchain panic on Windows ARM64 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace os.Symlink with OS-specific linkRepo helper for E2E_KEEP_REPOS. On Unix, symlinks as before. On Windows, writes a repo.txt file with the path since symlinks require elevated privileges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- cleanConfigDir: Unix uses symlink, Windows copies the file (symlinks require elevated privileges). Windows also injects primaryApiKey from ANTHROPIC_API_KEY env to prevent the API key confirmation dialog. - StartSession: Unix delegates to startSessionCommon with no-op callback. Windows returns nil to skip interactive PTY tests since ConPTY cannot reliably deliver key escape sequences to huh/bubbletea TUI forms. - NewPTYSession (Windows): resolve bare command names via exec.LookPath before passing to ConPTY, which unlike exec.Command does not search PATH. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
filepath.Rel() returns OS-native separators (backslashes on Windows), but git and the session state expect forward slashes. This caused duplicate entries in files_touched (docs/a.md and docs\a.md) which led to duplicate git tree entries on shadow branches, preventing shadow branch cleanup after commit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b9dcede to
b831086
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…on.go These symbols are already defined in tmux.go and shared by both session types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion Remove pty_session.go, pty_session_unix.go, pty_session_windows.go and the conpty dependency. Restore all agents to use NewTmuxSession. Keep cleanConfigDir as OS-specific (symlink on Unix, copy on Windows). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Undo filepath.FromSlash and filepath.ToSlash changes from b831086 — not needed now that interactive E2E tests are disabled on Windows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ications Reuse e2e-windows.yml via workflow_call so both Linux matrix and Windows run in parallel. Slack notification triggers on failure from either. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mpat Replace direct syscall.Setpgid/syscall.Kill usage with the existing platform-aware setupProcessGroup() in codex, copilot-cli, roger-roger, and vogon agents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tmux is only needed for interactive session tests which are skipped on Windows. Use NUL instead of /dev/null for GIT_CONFIG_GLOBAL on Windows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude's StartSession returns nil on Windows to skip tmux-dependent interactive tests. Use an empty temp file for GIT_CONFIG_GLOBAL instead of NUL which git on Windows cannot open as a config file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Symlink works on both platforms in CI. The OS-specific copy workaround for Windows is unnecessary since Bootstrap() already writes the config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use both CREATE_NEW_PROCESS_GROUP and DETACHED_PROCESS from golang.org/x/sys/windows so the analytics subprocess truly detaches from the parent console and survives parent exit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pjbgf
left a comment
There was a problem hiding this comment.
Small nit on the sigterm, apart from that LGTM.
Without SIGTERM handling, the CLI can't cancel its context and run cleanup when terminated by systemd, Docker, or plain `kill`. Add build-tagged helpers so Unix gets both SIGINT and SIGTERM while Windows stays on SIGINT only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixed |
Symlinks require elevated privileges on Windows. Add link_unix.go (real symlink) and link_windows.go (file copy) so E2E config setup works without Developer Mode or admin rights. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch from syscall.CREATE_NEW_PROCESS_GROUP to the windows package constants and add DETACHED_PROCESS to fully detach from the parent console in integration tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Summary
Adds Windows support across the CLI and test harness.
misetasksmoreas default pager)os.Interruptfor cross-platform compatibilityprocattr_unix.go,procattr_windows.go)DETACHED_PROCESSflagStartSessionreturns nil, tests auto-skipWINDOWS.mdguide for build, test, and architecture docsTest plan
mise run fmt && mise run lintpassesmise run test:cipasses (unit + integration + canary)session == nil)🤖 Generated with Claude Code