Problem
The pnpm clawdbot update command fails on systems with limited RAM due to the preflight validation system running out of memory during repeated full builds.
Error Details
The update process failed with two distinct error types:
1. Recent commits - Module error (upstream bug)
First 3 commits failed with:
error: Cannot find module './cjs/index.cjs' from ''
Bun v1.3.6 (Linux x64)
Affected commits:
2. Older commits - OOM kills
Subsequent commits were killed by the system OOM killer:
◇ ✗ preflight build (6aec34bc) (89.4s)
Killed
Affected commits tested: 6aec34b, 1c606fd, d1dd8a1, a22ac64, 71eb6d5, a14ca1a, 4c11fc0
Final result:
Update Result: ERROR
Root: /home/clawdbot/clawdbot
Reason: preflight-no-good-commit
Before: 2026.1.24-3
Total time: 984.9s
System Specifications
Hosting: Hetzner Cloud
- Instance ID: 118248348
- Region: eu-central (nbg1-dc3)
- Server type: CPX/CX series (based on hostname pattern)
Hardware:
- CPU: 2 vCPUs (Intel Xeon Skylake)
- RAM: 3.7 GB (no swap configured)
- Disk: 38GB SSD (16GB used, 20GB available)
Software:
- OS: Ubuntu 24.04.3 LTS (Noble Numbat)
- Kernel: 6.8.0-90-generic
- Node.js: v24.13.0 (via nvm)
- pnpm: 0.34.5
- Clawdbot: 2026.1.24-3
Analysis
The preflight system in src/infra/update-runner.ts (lines 483-540) is memory-intensive because it:
- Creates a temporary git worktree
- For each of up to 10 commits, performs:
- Fresh checkout
pnpm install (from scratch)
pnpm lint
pnpm build (TypeScript compilation with multiple workers)
- Does this sequentially until finding a working commit
This is significantly more memory-intensive than a normal build because:
- Each build is isolated and fresh (no shared node_modules)
- Multiple sequential builds can accumulate temp files
- TypeScript compilation spawns worker processes
- No incremental compilation caching
Reproduction
On a 4GB RAM Hetzner VPS:
cd /home/clawdbot/clawdbot
pnpm clawdbot update
Wait ~16 minutes for all preflight checks to fail.
Suggested Solutions
- Add memory requirements to docs - Document minimum 8GB RAM for updates
- Optimize preflight - Share node_modules between preflight attempts
- Reduce parallelism - Limit TypeScript worker count during preflight
- Add --skip-preflight flag - Allow users to bypass validation on trusted systems
- Better error messages - Detect low memory and suggest swap or upgrade
Workarounds
For users on low-memory systems:
- Add swap space (temporary fix)
- Upgrade to 8GB+ RAM instance
- Skip updates if current version works
- Use global npm install instead of git-based install
Additional Context
The current installation (2026.1.24-3) was built successfully initially, likely because it was installed from a pre-built npm package or built under different conditions (not in an isolated worktree).
Problem
The
pnpm clawdbot updatecommand fails on systems with limited RAM due to the preflight validation system running out of memory during repeated full builds.Error Details
The update process failed with two distinct error types:
1. Recent commits - Module error (upstream bug)
First 3 commits failed with:
Affected commits:
2. Older commits - OOM kills
Subsequent commits were killed by the system OOM killer:
Affected commits tested: 6aec34b, 1c606fd, d1dd8a1, a22ac64, 71eb6d5, a14ca1a, 4c11fc0
Final result:
System Specifications
Hosting: Hetzner Cloud
Hardware:
Software:
Analysis
The preflight system in
src/infra/update-runner.ts(lines 483-540) is memory-intensive because it:pnpm install(from scratch)pnpm lintpnpm build(TypeScript compilation with multiple workers)This is significantly more memory-intensive than a normal build because:
Reproduction
On a 4GB RAM Hetzner VPS:
cd /home/clawdbot/clawdbot pnpm clawdbot updateWait ~16 minutes for all preflight checks to fail.
Suggested Solutions
Workarounds
For users on low-memory systems:
Additional Context
The current installation (2026.1.24-3) was built successfully initially, likely because it was installed from a pre-built npm package or built under different conditions (not in an isolated worktree).