Skip to content

feat: add hosted daemon mode #289

@bradtaylorsf

Description

@bradtaylorsf

Summary

Add hosted daemon mode so Alpha Loop can run continuously against one repo, periodically triage issues, process safe ready work, poll for feedback, and resume paused sessions.

Why this matters

The desired hosted workflow is a resident repo steward: a process running on a server for each repo that keeps GitHub organized, runs safe work, asks humans for input, and resumes when feedback arrives. This needs a first-class daemon loop rather than a shell script that repeatedly invokes unrelated commands.

Proposed approach

  • Add alpha-loop daemon or an equivalent long-running command.
  • Support modes such as triage-only, feedback-only, run-only, and full.
  • Add configurable intervals for intake triage, feedback polling, work selection, health checks, and idle sleep.
  • Enforce repo-level locking so two daemon processes cannot mutate the same repo/session state unexpectedly.
  • Respect automation policy before starting or resuming work.
  • Allow the daemon to continue to the next eligible issue while another session waits for feedback, subject to max_active_sessions and max_paused_sessions.
  • Emit health and lifecycle events for startup, idle, selected work, skipped work, paused sessions, resume requests, and failures.
  • Handle graceful shutdown without corrupting active manifests or worktrees.

Acceptance criteria

  • alpha-loop daemon runs continuously until stopped.
  • Daemon mode supports triage-only, feedback-only, run-only, and full operation.
  • Intervals for triage, feedback polling, execution, and health checks are configurable.
  • A repo-level lock prevents multiple daemon instances from working the same repo concurrently by default.
  • The daemon respects automation policy before starting, resuming, or skipping work.
  • Waiting-for-feedback sessions do not block unrelated eligible work when policy allows another session.
  • Graceful shutdown records the current state and leaves resumable sessions intact.
  • Crash/restart behavior can recover active or paused sessions from manifests.
  • Tests cover mode selection, locking, interval scheduling with fake timers, waiting-session skip behavior, and graceful shutdown.

Out of scope

  • Multi-tenant SaaS control plane.
  • Native process supervisor installation.
  • Hosted dashboard UI.

Related

Metadata

Metadata

Assignees

Labels

engineLoop engine infrastructureenhancementNew feature or requestin-progressAgent is actively working on this issueserverExpress monitoring server

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions