zeroclaw-labs/zeroclaw · warning · anyhow::Error
No log files found in {}. Is the service installed?
Error message
No log files found in {}. Is the service installed? What it means
logs_macos resolves the daemon log directory (derived from the running executable's layout, e.g. the Homebrew var/log prefix) and expects the launchd StandardErrorPath/StandardOutPath files to exist. If neither the stderr nor the stdout log file is present, it assumes the service was never installed or never started and bails.
Source
Thrown at crates/zeroclaw-runtime/src/service/mod.rs:975
var_dir.join("logs")
} else {
config
.config_path
.parent()
.map_or_else(|| PathBuf::from("."), PathBuf::from)
.join("logs")
};
let stderr_log = logs_dir.join("daemon.stderr.log");
let stdout_log = logs_dir.join("daemon.stdout.log");
// Prefer stderr log (most informative), fall back to stdout
let log_file = if stderr_log.exists() {
stderr_log
} else if stdout_log.exists() {
stdout_log
} else {
bail!(
"No log files found in {}. Is the service installed?",
logs_dir.display()
);
};
if follow {
let status = Command::new("tail")
.args(["-n", &lines.to_string(), "-f"])
.arg(&log_file)
.status()
.context("Failed to run tail")?;
if !status.success() {
bail!("tail exited with non-zero status");
}
} else {
let status = Command::new("tail")
.args(["-n", &lines.to_string()])
.arg(&log_file)View on GitHub (pinned to 88bb9c8533)
Solutions
- Run 'zeroclaw service status' to confirm the install state
- Install and start the service ('zeroclaw service install && zeroclaw service start'), then retry logs
- Inspect the plist's StandardOutPath/StandardErrorPath values and check that directory directly
Defensive patterns
Strategy: validation
Validate before calling
// check the derived log dir before calling service::logs on macOS
let logs_dir = daemon_log_dir(); // same derivation the runtime uses (exe-relative var/log)
let has_logs = logs_dir.join("stderr.log").exists() || logs_dir.join("stdout.log").exists();
if !has_logs {
// install/start the service first instead of letting logs() bail
} Prevention
- Always start the service at least once before asking for logs
- Check 'zeroclaw service status' before 'service logs' in scripts
- Keep the Homebrew var/log prefix intact so the derived log dir matches
When it happens
Trigger: Running 'zeroclaw service logs' on macOS before the daemon has written anything: service not installed, installed but never started, or the log directory was cleaned.
Common situations: Fresh machine where logs runs before the first start; 'brew cleanup' removing var/log contents; custom install prefix whose log dir differs from the derived one.
Related errors
- No log files found at {}. Is the service installed?
- Messages database not found at {}. Ensure Messages.app is se
- the launchd daemon runner is only supported on macOS
- daemon child exited with status {status}
- Service log viewing is supported on macOS, Linux, and Window
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/b4c29950cc5fa0ec.
Report an issue: GitHub.