AI / Automation April 28, 2026

2026 OpenClaw disk exhaustion, JSONL rotation, and APFS purgeable space on a ProxyMac Mac mini

ProxyMac Engineering Team April 28, 2026 ~12 min read

Teams shipping OpenClaw on rented Mac mini M4 nodes across Hong Kong, Japan, Korea, Singapore, and the United States occasionally hit a cruel failure mode: MCP tools time out, agents restart-loop, yet top shows idle CPU. The root cause is often mundane—disk pressure. Apple Silicon desktops still ship with finite NVMe quotas; relentless JSONL diagnostics (see logging guide), container layers, and Xcode DerivedData leftovers can shrink effective free space below 5 GB, at which point APFS struggles to allocate extents for small writes and child processes return ENOSPC without a polite banner. This article explains how that surfaces inside OpenClaw, how to read df versus Disk Utility, how to design rotation compatible with launchd, and how to wire alerts next to health probes and gateway recovery playbooks.

How ENOSPC surfaces inside OpenClaw before users notice disk charts

OpenClaw orchestrates dozens of short-lived processes: MCP servers append trailing JSON objects, embedding models cache shards under ~/Library, and crash dumps land in Console if TCC prompts fail. When write(2) returns no space, Node may throw before flushing stderr—your dashboard shows “tool unavailable” instead of “volume full.” Pair disk checks whenever you chase deployment troubleshooting symptoms that appear only after multi-hour soak tests.

  • Symptom A: MCP subprocess exits with code 1 and empty logs.
  • Symptom B: Gateway LaunchAgent respawns every 45–90 s without crash reports.
  • Symptom C: Disk Utility still shows “50 GB available” while df -h disagrees—APFS snapshots are lying politely.

APFS free space, purgeable bytes, and why Docker or Xcode explode quietly

APFS borrows free space from purgeable caches—photos derivatives, Time Machine local snapshots, and file-provider placeholders. Under pressure the filesystem reclaims terabytes; until then df may show 92% utilisation while Finder claims breathing room. Run tmutil listlocalsnapshots / and compare against diskutil apfs listVolumeGroups. Container runtimes map overlayFS onto the Data volume; deleting unused images often returns 18–40 GB on CI-heavy hosts. Budget at least 15 GB steady-state headroom for OpenClaw plus model caches—anything tighter invites race conditions during nightly cron compaction.

Do not chmod 777 random folders. Freeing space through permissive ACLs trades away the guarantees from secrets documentation.

JSONL rotation pattern that cooperates with launchd

Treat JSONL like nginx logs: rotate when files cross 150 MB, keep 7 daily compressed archives, and ship cold lines to object storage if compliance allows. On macOS, newsyslog works for simple paths; for per-user agents, wrap OpenClaw’s logger with a small bash guard that calls mv app.log app-$(date +%s).log before crossing your threshold. Avoid relying on external logrotate binaries unless you vendor them—Gatekeeper path drift hurt teams who copied Linux Ansible roles verbatim. Coordinate rotation settings with the Git-tracked configs described in config versioning.

Symptom lookup table: translate operator language into disk facts

Cryptic symptomDisk signalImmediate command
“Model hung after six hours”Volume crossing 95% utilisationdf -h /System/Volumes/Data
“Agent keeps restarting”Unable to append JSONLls -lh ~/Library/Logs/OpenClaw/*.jsonl
“Downloads vanished”Purgeable caches reclaimed abruptlyDisk Utility First Aid plus snapshot thinning

Six-step disk triage before you reinstall OpenClaw

  1. Snapshot reality: capture df, diskutil info, and tmutil listlocalsnapshots in one ticket attachment.
  2. Locate heavy trees: du -hd1 ~ focusing on Logs, Library, and project workspaces.
  3. Rotate JSONL using the pattern above; verify launchd job still starts.
  4. Purge stale snapshots after confirming backups exist off-box.
  5. Restart OpenClaw via launchctl kickstart sequence from gateway recovery.
  6. Add disk alerts alongside uptime pings—fire when available bytes drop under 20 GB for five consecutive minutes.
Throughput tip: when disk IO saturates, MCP latency spikes resemble network loss—cross-check with concurrency tuning before chasing bogus WAN issues.

Capacity planning: translate gigabytes into operator decisions

A stock 512 GB SSD sounds infinite until three teams share one mini: forty gigabytes for Xcode toolchains, sixty for cached models, ninety for nightly integration artifacts, and suddenly you are one bad weekend away from zero bytes free. Budget each workload band explicitly—allocate 80 GB minimum for interactive developers, 40 GB for CI spillover on APFS volumes you can snapshot independently, and keep 25 GB unassigned as an emergency buffer for APFS metadata growth. When you cross 85% utilisation sustained for more than six hours, fail over agent traffic using the patterns in provider failover while you prune logs, not after MCP collapses.

SMB file shares mounted from the mini inherit the same disk pool—do not let designers drag multi-hundred-megabyte PSDs into a shared folder that also stores JSONL unless retention policies match. For regulatory exports, compress archives onto external volumes only when your security review allows; otherwise stick to encrypted sparsebundles on the internal SSD with documented lifetimes. Every gigabyte decision should live beside the GitOps repo discussed in config versioning so finance can trace why you requested the next tier up.

Treat disk snapshots like branch pointers: gorgeous when you understand them, catastrophic when ignored. Combine Hourly/Daily/Weekly Time Machine volumes with lightweight ZFS-style retention only after you prove snapshot deltas stay small against JSONL churn; otherwise rely on rotated flat files plus cold storage exports. Document who signs off before deleting archives—without that chain of custody, auditors will assume you tossed evidence the moment disk pressure ticked upward. Print the diskutil apfs list footer in your incident log so midnight triage notes never guess container UUIDs.

FAQ

Should I disable unified logging? Lower subsystem verbosity instead of deleting /var/db/diagnostics.

Does iCloud offload interact with OpenClaw workspaces? Yes—Desktop/Documents optimisation can stall writes; exclude agent directories.

What about RAM disk caches? Useful for ephemeral builds on M4, but sizes must stay bounded—document caps in runbooks beside help articles.

Why ProxyMac Mac mini remains the realistic platform for disk-heavy agents

Rented Mac mini M4 hosts ship fast SSDs with predictable wear compared to oversubscribed hypervisors; you can provision HK / JP / KR / SG / US regions without shipping hardware while keeping APFS snapshots aligned with compliance retention. Pair disk hygiene with transparent pricing, route operators through help center paths, and reserve GUI debugging via VNC when Finder-level cleanup is faster than SSH.

Keep agents online with headroom

HK / JP / KR / SG / US · JSONL-ready Mac mini