Skip to content

fix(windows): detect broken ccproxy binary and fall back to pipx - #1

Merged
ClintonSarkar merged 1 commit into
mainfrom
fix/windows-ccproxy-plugin-fallback
Jul 15, 2026
Merged

fix(windows): detect broken ccproxy binary and fall back to pipx#1
ClintonSarkar merged 1 commit into
mainfrom
fix/windows-ccproxy-plugin-fallback

Conversation

@ClintonSarkar

Copy link
Copy Markdown
Owner

fix(windows): detect broken ccproxy binary and fall back to pipx

The pre-built Windows ccproxy.exe v0.2.10 ships without any auth provider plugins (see CaddyGlow/ccproxy-api#75). This makes clawde auth fail with No auth providers installed in this CCProxy release even on a fresh install.

This PR makes the clawde installer detect the broken binary and automatically fall back to a working install via pipx (Python 3.11+). If Python/pipx aren't available, the installer prints a clear next-step message instead of silently leaving the user with a non-functional clawde auth.

Changes

install.ps1

  • Test-CCProxyHasProviders $bin\ccproxy.exe — runs ccproxy auth providers and returns $true only if at least one provider name appears in the output (returns $false on the "No OAuth providers found" / "No plugins found" cases, or on non-zero exit).
  • Test-PipxAvailable — checks for py/python on PATH at >= 3.11, plus pipx on PATH.
  • Install-CCProxyViaPipx — runs pipx install ccproxy-api[plugins-claude,plugins-codex], then drops a tiny ccproxy.cmd shim into the clawde bin dir that forwards to the pipx-installed script. The broken ccproxy.exe is removed first.
  • Install-CCProxy — after a successful install, calls Test-CCProxyHasProviders and, if false, dispatches to the pipx fallback (or prints a manual-fix message).

cli/clawde.ps1

  • Find-Binary now falls back to a .cmd shim with the same basename when the .exe is missing. This lets the pipx-installed ccproxy.cmd shim work transparently with the existing clawde start / clawde status / clawde update paths.
  • Cmd-Start wraps Start-Process in cmd /c <shim> when the resolved binary is a .cmd, so PID/log redirection still works.

README.md

  • A short note under Requirements explaining the Windows situation and pointing at the pipx workaround.

Why this approach

The real fix needs to land in CaddyGlow/homebrew-packages (the upstream CI that builds the Windows binary). That's a separate PR over there (CaddyGlow/homebrew-packages#1) plus a docs PR on CaddyGlow/ccproxy-api (#76).

In the meantime, this is the path that gets Windows users to a working clawde auth without them having to discover the issue themselves. The fallback only triggers when the binary is detected as broken, so users on a fixed release are unaffected.

Test plan

  • On a Windows machine with a known-broken v0.2.10 ccproxy.exe, run .\install.ps1. It should auto-detect the missing plugins and switch to the pipx shim.
  • After install, clawde auth should reach the OAuth browser step (no "No auth providers installed" error).
  • On a Linux/macOS box, bash install.sh is unchanged.

The pre-built Windows ccproxy.exe v0.2.10 ships without any auth provider
plugins (CaddyGlow/ccproxy-api#75). This makes 'clawde auth' fail with
'No auth providers installed' even on a fresh install.

Changes:
- install.ps1: after installing ccproxy.exe, call ccproxy auth providers
  to detect the empty-plugin-list state. If empty AND pipx+Python 3.11+
  are available, automatically run
  'pipx install ccproxy-api[plugins-claude,plugins-codex]' and replace
  ccproxy.exe in the clawde bin dir with a small .cmd shim that forwards
  to the pipx-installed binary.
- install.ps1: new helpers Test-CCProxyHasProviders, Test-PipxAvailable,
  Install-CCProxyViaPipx.
- cli/clawde.ps1: Find-Binary falls back to a .cmd shim when the .exe is
  missing. Cmd-Start wraps Start-Process with cmd /c for .cmd shims.
- README.md: note the Windows situation and the pipx fallback.

Until the upstream fix lands, this is the path that works for Windows
users without requiring them to install Python and pipx manually.
@ClintonSarkar
ClintonSarkar merged commit c696a30 into main Jul 15, 2026
@ClintonSarkar
ClintonSarkar deleted the fix/windows-ccproxy-plugin-fallback branch July 15, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant