Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Your Unattended AI Agent Looks Healthy and Does Nothing: 7 Silent Failures on macOS launchd (2026)

Description and use

Unattended AI agents scheduled via macOS launchd often appear healthy in logs yet perform no work, due to silent failures such as missing environment variables, keychain access, CPU throttling, watchdog misconfiguration, and stale lock files. Fixes include adding USER, removing ProcessType Background, correcting watchdog exit codes, and validating lock file age.

Problem

Unattended AI agents scheduled via macOS launchd often appear healthy in logs yet perform no work, due to silent failures such as missing environment variables, keychain access, CPU throttling, watchdog misconfiguration, and stale lock files.

Outcome

The agent now reliably performs scheduled tasks, with failures logged and actionable alerts instead of silent health signals.

Workflow

  • Verify launchctl list and plist installation
  • Check plist paths and environment variables
  • Add USER to EnvironmentVariables for keychain access
  • Remove ProcessType Background or set to Interactive
  • Adjust watchdog to exit 1 on timeout
  • Implement lock‑age check to prevent stale lock files
  • Test agent execution and log output

Evidence

Every one of the seven bugs produced the SAME symptom: a healthy-looking log and zero work done.

Source

A launchd agent gets a near-empty environment. Without USER the Claude CLI cannot read its login-keychain credential and dies in 1 second with 'Not logged in'.

Source

ProcessType Background confines the job and every child to E-cores. Measured 5.0x slower on an M3 Ultra: 147ms interactive vs 735ms.

Source

A watchdog that exits 0 on timeout turns a truncated run into a reported success. Exit 1.

Source

  • Record date: 2026-09-22T04:30:20.261Z