Skip to content

fix(mac-runner): make autorecover LaunchAgent persistent - #162

Merged
FluffyAIcode merged 1 commit into
mainfrom
AgentMemory/mac-runner-autorecover-tcc-0712
Jul 12, 2026
Merged

fix(mac-runner): make autorecover LaunchAgent persistent#162
FluffyAIcode merged 1 commit into
mainfrom
AgentMemory/mac-runner-autorecover-tcc-0712

Conversation

@FluffyAIcode

Copy link
Copy Markdown
Owner

Summary

  • install the recovery script under ~/Library/Application Support/Kakeya instead of a TCC-protected repository path
  • use the runner directory as the LaunchAgent working directory
  • set AbandonProcessGroup=true so the detached Runner.Listener survives after the watchdog exits
  • add regression tests for the generated LaunchAgent contract

Why

launchd could not execute recovery scripts from a checkout under ~/Documents, and it killed the fallback nohup runner when the watchdog exited. The runner appeared briefly online but immediately disappeared.

Live verification

  • user LaunchAgent installed successfully
  • Runner.Listener remains alive after watchdog exit
  • runner_healthcheck.sh reports all core checks PASS
  • GitHub reports kakeya-mac-m4 online and automatically assigns queued jobs

Tests

  • PYTHONPATH=.:sdks/python pytest -q tests/inference_engine/bridge/test_autorecover_installer.py tests/inference_engine/bridge/test_runner_python.py
  • bash -n scripts/mac_bridge/install_autorecover_launchagent.sh

Made with Cursor

Install the recovery script outside TCC-protected repository paths and preserve its detached Runner.Listener child after the watchdog exits.

Co-authored-by: Cursor <cursoragent@cursor.com>
@FluffyAIcode
FluffyAIcode merged commit bae4fd5 into main Jul 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant