zeroclaw-labs/zeroclaw · warning · DiagItem
low disk space: only {avail_mb} MB available
Error message
low disk space: only {avail_mb} MB available What it means
A `zeroclaw doctor` warning from `check_workspace`: the filesystem holding `data_dir` reports fewer than 100 MB available (measured best-effort by shelling out to `df -m <data_dir>`). Low disk threatens session logs, state files, and probe writes before the OS returns ENOSPC. If `df` is unavailable the check is silently skipped, so seeing the warning means `df` ran and reported under the 100 MB threshold.
Source
Thrown at crates/zeroclaw-runtime/src/doctor/mod.rs:1511
}
}
Err(e) => {
items.push(DiagItem::error(
cat,
format!("directory is not writable: {e}"),
));
}
}
// Disk space (best-effort via `df`)
if let Some(avail_mb) = disk_available_mb(ws) {
if avail_mb >= 100 {
items.push(DiagItem::ok(
cat,
format!("disk space: {avail_mb} MB available"),
));
} else {
items.push(DiagItem::warn(
cat,
format!("low disk space: only {avail_mb} MB available"),
));
}
}
let mut agent_aliases: Vec<&String> = config.agents.keys().collect();
agent_aliases.sort();
for alias in agent_aliases {
let agent = config.agents.get(alias).expect("alias from keys()");
if !agent.enabled {
continue;
}
let agent_ws = config.agent_workspace_dir(alias);
check_agent_file(&agent_ws, "SOUL.md", alias, cat, items);
check_agent_file(&agent_ws, "AGENTS.md", alias, cat, items);
}
}View on GitHub (pinned to 88bb9c8533)
Solutions
- Free space on the filesystem holding `data_dir` (clear logs/caches, remove old session data).
- Or relocate `data_dir` in config to a volume with headroom.
- Set up a disk-space alert/monitor so the daemon never reaches this state.
- Re-run `zeroclaw doctor` and confirm it now reports `disk space: N MB available` as ok.
Defensive patterns
Strategy: validation
Validate before calling
let out = std::process::Command::new("df").arg("-m").arg(&config.data_dir).output()?;
let avail_mb: u64 = String::from_utf8_lossy(&out.stdout)
.lines().rev().find(|l| !l.trim().is_empty())
.and_then(|l| l.split_whitespace().nth(3)?.parse().ok())
.unwrap_or(0);
assert!(avail_mb >= 100, "data_dir filesystem has only {avail_mb} MB free"); Try / catch
// Best-effort, same posture as doctor: skip the check when df is unavailable
if let Some(avail_mb) = disk_available_mb(&config.data_dir) {
if avail_mb < 100 { /* alert / refuse to start heavy jobs */ }
} Prevention
- Monitor free space on the data_dir filesystem with the same 100 MB threshold doctor uses.
- Cap or rotate session logs and state artifacts so the daemon cannot fill the disk.
When it happens
Trigger: Running `zeroclaw doctor` when `df -m <data_dir>` reports < 100 MB available — typically a full root partition, a small tmpfs/container volume, or a quota-backed home directory.
Common situations: Long-running daemon accumulating session logs on a small VPS; container with a small writable layer; CI runner with a nearly full disk; `/tmp` mounted small with `data_dir` pointing into it.
Related errors
- [{alias}] {name} not found (optional)
- model route "{}" uses invalid model_provider "{}": {}
- embedding route "{}" uses invalid model_provider "{}": {}
- agent "{name}" uses invalid model_provider "{provider_ref}":
- OpenAI Codex credentials are signed in but no model provider
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/827e5fd7648b0940.
Report an issue: GitHub.