brain/
conceptartificial-intelligence

Unattended all-day agent loop

Notes

Unattended all-day agent loop

One-line summary: Keep a bot working all day by waking on a clock or event, reading a small durable queue/state file, doing one atomic unit in a fresh isolated session, writing the result to git, then exiting — not by keeping one session alive.

Vintage: 2026-08. Practitioner blogs April 2026; Claude Code Routines announced 2026-04-14; Cherny maintenance experiment and auto-mode default recorded 2026-08. Capability claims are a snapshot.

The insight

The inner loop (perceive → reason → act until a task ends) is well-described encyclopedia material. All-day autonomy is an outer loop around it. 2026 practitioner writeups and vendor docs converge on the same outer loop: wake → read durable state → one isolated unit of work → write artifacts → sleep. The scheduler (cron, OpenClaw heartbeat, Claude Code cloud routine, Cursor Cloud Agent trigger) is interchangeable. The loop that fails is the one that tries to remember the day inside one context window.

This is complementary to parallel-claude-workflow (a human tending a fleet of interactive sessions) and plan-then-execute-coding (steer the plan, then auto-accept). Those still assume someone is jumping between tabs. The unattended pattern assumes nobody is.

The chain

Immortal-session / in-context memory decays within about an hour → durable filesystem or queue state plus isolated wakes → reviewable git/PR artifacts keep a human at the merge gate → all-day progress without babysitting. Canonical: immortal-session-decay-to-unattended-queue-loop.

Evidence

Design implications

  • Durable state is the queue + wiki + git, not the session. Hot state is the next pending row; cold state is already-ingested sources and CLAUDE.md / agents.md (claude-md-team-knowledge-base).
  • One unit per wake. A research queue that drains one entry per invocation is the same rule as French/SitePoint, not a lesser version.
  • Heartbeat is for cheap "is there anything?" checks. Burning a frontier model every 15 minutes is the cost failure mode openclaw documents.
  • Human review stays at the merge/ingest gate (Cherny's 180/388 still required a human).
  • Do not replace an existing coded drain (queue-next → promote → ingest → queue-done) with a new always-on app. The cited systems are a scheduler + a queue file + an isolated agent + a review surface.

Contradictions / tensions

  • Pattern vs product. Routines, Cursor Cloud Agents, OpenClaw heartbeat, and a cron script implement the same outer loop. No bake-off on a research-wiki workload. "Best" is not a SKU.
  • Always-on vs drain. Heartbeat optimizes for proactive notify. Routines / SQS / cron-drain optimize for "do the next unit, then stop." For a promote+ingest research queue the drain fits the architecture; that is not a measured comparison.
  • Quota vs "throughout the day." Routine daily caps plus subscription usage mean a Max-plan Claude Code routine cannot fire every hour all day without overage. Desktop auto-continue only resumes after reset.
  • Linear Loops (July 2026 team-level scheduled Linear Agent) is mentioned in search results; official pages timed out this pass — unconfirmed.

Open questions

  • How much workspace memory should a research bot rewrite each wake without the optimism-compounding DEV warned about ("great progress today" becoming next-loop belief)?
  • At what queue depth does one-unit-per-wake fall behind a weekday of arrivals?

Related

Referenced by
brain — research vault