Skip to content

feat(runtime): unattended/detached loop execution — managed runner ("close your laptop") #477

@windoliver

Description

@windoliver

Summary

Grove loops today require the operator's machine or a babysat server — the CLI loop driver owns the foreground process (src/cli/commands/session.ts:389-410; grove up/grove session run attached). There is no detached/managed runner that keeps a loop running unattended so the operator can "close the laptop" and reattach later. This is the one Stage-5 leg the article calls out ("use Claude Code in the cloud") that grove doesn't have.

Current state — most of the substrate already exists

  • Durable loop state: NexusWorkflowStore (VFS /zones/{zoneId}/workflows/{id}.json, src/nexus/nexus-workflow-store.ts) + SQLite stop_status persistence (src/local/sqlite-goal-session-store.ts:372).
  • Crash/restart recovery: DeadlineWatcher.rebuildFromStore() re-registers timers on startup (src/core/deadline-watcher.ts:116); SessionOrchestrator reads session metadata back from .grove/grove.db.
  • Supervision survives independently: AcpxSupervisor, TaskController, ClaimController reconcile loops.
  • Gap: no long-lived host/daemon that runs the loop detached from the operator's terminal, and no detach/reattach UX. State persists, but the driver dies with the foreground process.

Proposed direction (design issue — break into subtasks)

Acceptance criteria

  • Start a session, disconnect the controlling terminal, confirm the loop runs to its terminal stop status unattended.
  • Reattach from a fresh client and observe live state + final outcome.

Context

Completes the article's "loop runs on infrastructure time instead of your attention" leg. Related: #267 (agentenv env composition), #379 (unattended kickoff triggers), #376 (run health for monitoring detached runs), #475 (budget caps — essential before anything runs unattended).

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-orchestrationMulti-agent spawning, coordination, and lifecycleenhancementNew feature or requestspecProtocol specification

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions