wake-agent: event-triggered headless agent continuations, plus a session-footer indicator #281
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#281
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Give long-running agent work a way to resume itself: a small tool that waits on an external event, then spawns a fresh headless agent with a written brief, plus a session-footer indicator that shows when such a continuation is live.
Primary goals:
wake-agent <probe-cmd> <brief-file>runs as a detached user process; when<probe-cmd>succeeds it invokespi --no-session -p "$(cat brief)"with a timeout, logging to a known file.setFooter,docs/tui.md) driven by the same sentinel file the watcher touches, so any session on the machine showswake-agent: runningat a glance.Current state and specifics
The pieces all exist separately; only the convention is missing. Headless runs are
pi --no-session -p(docs/../usage); the deployment already fires agent flows from systemd timers (the memory-trace timer inallod/archetypesmodules/memory-tracks.nix,OnCalendar=hourly), and extension footer hooks are documented indocs/tui.md(setFooter, persistent status entries). A pilot has run the pattern by hand: a shell watcher polled a log marker on a remote host every 5 minutes with a cap and a single bounded retry, then spawned a headless agent with a written work order (verify, implement against a live system, cold-review, PR, and stop at named human gates with a report). It worked; it is also one-off, undistributed, unpolished, and invisible in any session UI — exactly the gap.Design notes from the pilot: the watcher must never trust a single liveness probe (a dying process and a working one look alike; re-check after a grace sleep); failure branches must write artifacts, not just exit codes; the spawned agent's brief must be self-contained because it inherits nothing; and a 90-minute timeout is enough for a focused single-PR turn but should be a parameter. The sentinel file (touched on start, on spawn, on exit, with the log path inside) is what makes the footer indicator trivial and the state inspectable by anything, not just the TUI.
Scope
In: the
wake-agentCLI (wait/retry/timeout/status-file contract), the sentinel-file convention, the footer-badge extension reading it, and the pilot gate. Out: in-harness subagent spawning (pi intentionally runs continuations as separate sessions); general workflow orchestration — this is one event, one agent, one brief; and any deployment-specific wiring, which stays in the deployment's own repos. A clickable pop-open trace view is a possible later slice; the badge plustail -fon the log is the v1.