fix(windows): preserve source extension when copying CLI to versioned dir#249
Open
AgentA-asaf wants to merge 7 commits intomainfrom
Open
fix(windows): preserve source extension when copying CLI to versioned dir#249AgentA-asaf wants to merge 7 commits intomainfrom
AgentA-asaf wants to merge 7 commits intomainfrom
Conversation
- run_cli_login returns OAuth URL synchronously (waits up to 15s); frontend displays URL in launch panel and opens browser from host - Add RunCliLogin/CancelCliLogin Tauri commands; wire frontend setAuthUrl - Fix Windows CLI versioned-install path: derive copy destination extension from source binary (.exe→.exe, .cmd→.cmd) instead of hardcoding .cmd (cf1710f broke full-package installs by copying claude.exe→claude.cmd) - Add retro doc: docs/retro-cli-exe-cmd-regression.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… dir cf1710f hardcoded .cmd as the versioned bin destination on Windows to fix npm-based providers (codex/gemini). This broke full-package installs: claude.exe was copied into claude.cmd — a PE binary with a batch filename — causing cmd.exe /C to fail and get_cli_version to return "unknown". Fix: - Step 1 (already-installed check) now probes both .exe and .cmd candidates - Fast-path copy derives the destination extension from the source file (.exe source → .exe dest, .cmd source → .cmd dest) - Slow-path (post-npm-install) still uses .cmd since npm always produces .cmd wrappers on Windows Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
ReAgent Diagnostics
| Field | Value |
|---|---|
| ReAgent Version | 5.12.4 |
| Project Context | CLAUDE.md loaded |
| Model | claude-opus-4-6 |
| Effort | high |
| Ref Repos | Disabled |
| Merge Analysis | Clean |
| Review Time | 125.6s |
| Timestamp | 2026-03-28T21:12:57Z |
| Repository | agentmuxai/agentmux |
| PR | #249 |
Issues:
- agentmuxsrv-rs/src/server/websocket.rs:1733 - installsysdep timeout (5 min) drops the
childwithout killing it; tokio'sChild::dropdetaches but does not kill the process, so a timed-out winget/brew installer will continue running as an orphan. Need tochild.kill()before returning the timeout error. - Cargo.toml:7-8 - Unrelated release profile changes (
lto = true→"thin",codegen-units = 1→4) not mentioned in PR description. These weaken release binary optimization for faster compile times — should be a separate commit/PR or at least documented.
When the OAuth browser redirect to localhost fails, the auth server shows a manual authentication code. Added a paste input + Submit button below the login URL so users can enter it without leaving the app. - run_cli_login: stdin now piped; background task forwards codes via mpsc - New Tauri command: write_cli_login_stdin(code) → sends to CLI stdin - AppState: cli_login_stdin_tx replaces cli_login_stdin (Send-safe channel) - AgentDocumentView: auth code input field + Submit button (Enter or click) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
ReAgent Diagnostics
| Field | Value |
|---|---|
| ReAgent Version | 5.12.4 |
| Project Context | CLAUDE.md loaded |
| Model | claude-opus-4-6 |
| Effort | high |
| Ref Repos | Enabled (dev-tools, shared-infrastructure) |
| Merge Analysis | Clean |
| Review Time | 134.5s |
| Timestamp | 2026-03-28T21:44:39Z |
| Repository | agentmuxai/agentmux |
| PR | #249 |
Issues:
- agentmuxsrv-rs/src/server/websocket.rs:1778 - installsysdep timeout (5 min) drops the future containing
childwithout killing it;tokio::process::Child::dropdetaches but does not kill the process, so a timed-out winget/brew installer continues running as an orphan. Callchild.kill()before returning the timeout error. - Cargo.toml:7-8 - Unrelated release profile changes (
lto = true→"thin",codegen-units = 1→4) not mentioned in PR description. These weaken release binary optimization — should be a separate commit/PR or documented. - src-tauri/src/commands/platform.rs:341 - stdout reader task
breaks after capturing the OAuth URL, dropping the pipe handle. On Linux/macOS the CLI process receives SIGPIPE on its next stdout write, which can terminate the login process before the OAuth callback completes. Continue draining the pipe after URL capture instead of breaking. - src-tauri/src/commands/platform.rs:356 - Same pipe-drop issue on the stderr reader task —
breakafter URL capture can kill the CLI via SIGPIPE on subsequent stderr writes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
ReAgent Diagnostics
| Field | Value |
|---|---|
| ReAgent Version | 5.12.4 |
| Project Context | CLAUDE.md loaded |
| Model | claude-opus-4-6 |
| Effort | high |
| Ref Repos | Disabled |
| Merge Analysis | 22 regression(s) detected |
| Review Time | 90.6s |
| Timestamp | 2026-03-29T04:02:46Z |
| Repository | agentmuxai/agentmux |
| PR | #249 |
Issues:
- agentmuxsrv-rs/src/server/websocket.rs:1778 - installsysdep timeout drops the future containing
childwithout killing it;tokio::process::Child::dropdetaches but does not kill the process, so a timed-out winget/brew installer continues running as an orphan. Callchild.kill().awaitbefore returning the timeout error. - src-tauri/src/commands/platform.rs:341 - stdout reader task
breaks after capturing the OAuth URL, dropping the pipe. On Linux/macOS the CLI process receives SIGPIPE on its next stdout write, which can terminate the login process before the OAuth redirect callback completes. Continue draining the pipe after capturing the URL instead of breaking. - src-tauri/src/commands/platform.rs:356 - Same SIGPIPE issue on stderr reader —
breakafter URL capture drops the pipe and can kill the CLI via SIGPIPE on subsequent writes. - Cargo.toml:7-8 - Unrelated release profile changes (
lto = true→"thin",codegen-units = 1→4) weaken release binary optimization; not mentioned in PR description and should be a separate commit or documented.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cf1710fhardcoded.cmdas the versioned bin destination on Windows to fix npm-based providers (codex/gemini). This broke full-package installs:claude.exewas copied intoclaude.cmd— a PE binary with a batch filename — causingcmd.exe /Cto fail andget_cli_versionto return(unknown)..exeand.cmdcandidates. Fast-path copy derives the destination extension from the source file (.exe→.exe,.cmd→.cmd). Slow-path (post-npm-install) still uses.cmdsince npm always produces.cmdwrappers on Windows.docs/retro-cli-exe-cmd-regression.mdAffected providers
claude.execopied as.cmd❌.execopied as.exe✅codex.cmd→.cmd✅gemini.cmd→.cmd✅Test plan
~/.agentmux/<version>/cli/claude/and relaunch — should detect~/.local/bin/claude.exeand copy asclaude.exe, notclaude.cmd(unknown).cmd)🤖 Generated with Claude Code