brain/
← all mechanisms
medium convictionactive · updated 2026-08-18T00:00:00.000Z

Immortal-session decay → durable queue + isolated wakes → reviewable artifacts → unattended all-day progress

A context window that stays up all day loses the plot; the working all-day loop is a coded outer scheduler that wakes, reads a small durable queue, runs one isolated agent session, writes git/PR artifacts a human can merge, then exits.

The chain
1
Keeping one agent session (and its context window) alive for hours causes plot-loss: invented file trees, rewritten working code, and optimism that compounds in the state file.
From 2026-08-18-autoresearch-effective-all-day-bot-loops: SitePoint's diagnosis of why agents "lose the plot after an hour" is the same mechanism: context overflow, invented file trees, rewrite of working code, intent drift that tests do not catch.
From 2026-08-18-autoresearch-effective-all-day-bot-loops: State says "great progress" so the next loop believes it
2
The replacement is a coded outer loop: wake on a clock or event, read a small durable queue/state file, run one atomic unit in a fresh isolated session, write results, exit.
From 2026-08-18-autoresearch-effective-all-day-bot-loops: "wake on a clock or event, read a small durable state file, do one atomic unit of work in a fresh isolated session, write the result back to files/git, then exit."
From 2026-08-18-autoresearch-effective-all-day-bot-loops: `state.md` must stay small (under 4 KB) because it is injected every iteration
From 2026-08-18-autoresearch-effective-all-day-bot-loops: Each scheduled/API/GitHub fire starts a new session that clones the default branch
3
Progress is real only if the wake leaves a reviewable artifact (git push / PR) and failures back off into a human review queue instead of retrying forever.
From 2026-08-18-autoresearch-effective-all-day-bot-loops: "no git push = nothing happened"
From 2026-08-18-autoresearch-effective-all-day-bot-loops: "those routines opened **388 PRs**, of which **180 were merged** after Claude Code Review plus human review."
From 2026-08-18-autoresearch-effective-all-day-bot-loops: "47 failed re-queues in 4 minutes"
4
The scheduler itself should stay a workflow (cron / queue drain / routine trigger); only the inner unit of work needs to be an agent — and quota/cost caps bind how often that inner agent can fire.
From 2026-08-18-autoresearch-effective-all-day-bot-loops: **workflows** are LLMs on predefined code paths; **agents** are LLMs that dynamically direct their own process
From 2026-08-18-autoresearch-effective-all-day-bot-loops: "Pro 5/day, Max 15/day, Team/Enterprise 25/day"
From 2026-08-18-autoresearch-effective-all-day-bot-loops: "default Opus + 30-minute interval is estimated at ~$15/day; Haiku + 60-minute + quiet hours drops that to ~$0.60/day"
What would falsify this
  • Step 1: A single session with compaction/memory reliably holds a full workday without durable files.
  • Step 3: Unattended loops produce accepted PRs at Cherny-like rates without a human merge gate.
  • Step 4: Frontier-model heartbeats every 15 minutes stay cheap enough to ignore the workflow/agent split.
Contradictions / tensions
  • No bake-off compares cron vs Routines vs OpenClaw heartbeat on a research-wiki workload — the chain is architectural, not a product ranking.
  • Linear Loops (July 2026) may be the team-governance version; official pages timed out this pass.
Implications
  • A research vault that already drains one QUEUE.md entry per wake is already on this chain; do not replace it with a new always-on app.
  • Heartbeat (openclaw) is the cheap-check variant of step 2, not a substitute for a work queue.
  • Cursor Cloud Agents and Claude Code Routines are isolated inner sessions (step 2); they still need an outer trigger.
Companies
Concepts
Open questions