From 760fa22deac49f238249289615e81bb6cc59e04a Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Sat, 21 Feb 2026 17:56:02 -0800 Subject: [PATCH] fix: bump fly default VM to 4GB, add 10GB volume, hide keepalive dots (#1654) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Default VM memory: 1024MB → 4096MB (all agents except ZeroClaw which stays at 1024MB). Prevents OOM kills during native installs. - Attach a 10GB persistent volume at /data with a /root/work symlink so agents have enough storage to clone repos and work. Configurable via FLY_VOLUME_SIZE env var. - Keepalive: changed dots to spaces so they're invisible in terminal. Co-authored-by: lab <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) --- cli/package.json | 2 +- cli/src/fly/fly.ts | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cli/package.json b/cli/package.json index 6ee99649..edb397c7 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/spawn", - "version": "0.5.30", + "version": "0.5.31", "type": "module", "bin": { "spawn": "cli.js" diff --git a/cli/src/fly/fly.ts b/cli/src/fly/fly.ts index c2a3b2f8..bea2fe77 100644 --- a/cli/src/fly/fly.ts +++ b/cli/src/fly/fly.ts @@ -698,10 +698,10 @@ export async function runServer( const fullCmd = `export PATH="$HOME/.local/bin:$HOME/.bun/bin:$PATH" && ${cmd}`; const flyCmd = getCmd()!; - // Wrap command with a background keepalive that prints a dot to stderr every + // Wrap command with a background keepalive that sends a space to stderr every // 10s. Without this, flyctl tears down silent SSH sessions ("session forcibly - // closed") when no data flows for too long (e.g. during bun install). - const wrappedCmd = `(while true; do sleep 10; printf '.' >&2; done) & _ka=$!; (${fullCmd}); _rc=$?; kill $_ka 2>/dev/null; wait $_ka 2>/dev/null; exit $_rc`; + // closed") when no data flows for too long (e.g. during npm install). + const wrappedCmd = `(while true; do sleep 10; printf ' ' >&2; done) & _ka=$!; (${fullCmd}); _rc=$?; kill $_ka 2>/dev/null; wait $_ka 2>/dev/null; exit $_rc`; const escapedCmd = wrappedCmd.replace(/'/g, "'\\''"); // Use fly ssh console (WireGuard) instead of fly machine exec (HTTP) to avoid @@ -846,6 +846,8 @@ export async function waitForCloudInit(): Promise { // Install bun first (single binary, no deps), then Node.js as a direct binary // download from nodejs.org — no apt nodejs/npm/python3, no NodeSource, no n. const setupScript = [ + `echo "==> Setting up workspace volume..."`, + `if [ -d /data ]; then mkdir -p /data/work && ln -sf /data/work /root/work && echo 'cd /root/work 2>/dev/null' >> ~/.bashrc; fi`, `echo "==> Installing base packages..."`, `export DEBIAN_FRONTEND=noninteractive`, `apt-get update -y && apt-get install -y --no-install-recommends curl unzip git ca-certificates xz-utils || true`,