Automated patcher that enables Auto Mode (claude --enable-auto-mode) in
Claude Code for users running through a proxy (ANTHROPIC_BASE_URL).
A GitHub Actions workflow checks for new Claude Code releases every 6 hours, patches the binaries for all platforms, and publishes them as a GitHub Release.
Claude Code gates Auto Mode behind a server-side feature flag
(tengu_auto_mode_config) fetched via GrowthBook remote evaluation at
api.anthropic.com.
When you point Claude Code at a proxy (via ANTHROPIC_BASE_URL), the
GrowthBook client cannot establish trust with Anthropic's servers.
It falls back to a hardcoded default: "disabled".
This triggers the circuit breaker:
auto mode temporarily unavailable
This repo patches that default from "disabled" to "enabled".
Inside the compiled binary, the minified JS contains a function
parseAutoModeEnabledState that validates the feature flag value:
function XX(Y) {
if (Y === "enabled" || Y === "disabled" || Y === "opt-in") return Y;
return DEFAULT_VAR; // DEFAULT_VAR = "disabled"
}The patcher locates DEFAULT_VAR by anchoring on the unique "opt-in"
string literal, then replaces the declaration (same byte length):
VARNAME="disabled";var -> VARNAME="enabled"; var
When GrowthBook skips the fetch (no trust), the function now returns
"enabled" instead of "disabled", and the circuit breaker stays off.
Real Anthropic users are unaffected -- their value comes from the live GrowthBook response.
Go to Releases and grab the binary for your platform:
| Platform | File |
|---|---|
| Linux x64 | claude-linux-x64 |
| Linux ARM64 | claude-linux-arm64 |
| Linux x64 (musl/Alpine) | claude-linux-x64-musl |
| macOS x64 (Intel) | claude-macos-x64 |
| macOS ARM64 (Apple Silicon) | claude-macos-arm64 |
| Windows x64 | claude-windows-x64.exe |
Replace your existing claude binary:
# Linux / macOS
cp claude-linux-x64 ~/.local/bin/claude # adjust filename for your platform
chmod +x ~/.local/bin/claude# Windows
copy claude-windows-x64.exe %USERPROFILE%\.local\bin\claude.exeThen launch Claude Code with auto mode:
claude --enable-auto-modepython scripts/patch_binary.py /path/to/claude /path/to/claude-patchedThe GitHub Actions workflow (.github/workflows/patch-and-release.yml):
- Runs every 6 hours (+ manual dispatch)
- Reads the latest version from the GCS distribution bucket
- Downloads platform binaries from GCS (Linux, macOS) and npm (Windows)
- Applies the patch via
scripts/patch_binary.py - Publishes a GitHub Release with all patched binaries
Inspired by claudex.
This project is not affiliated with Anthropic. Use at your own risk.