what is the best way to build an effective loop to keep your bot working auto…
what is the best way to build an effective loop to keep your bot working auto…
The question
what is the best way to build an effective loop to keep your bot working autonomously throughout the day?
Why it matters
Paul already runs Grok Bot (Alfred) as a research partner on pmcclelland/brain with weekday cron, a QUEUE.md drain, Cursor cloud agents for wiki/code PRs, and an X ingest pass. The useful answer is the pattern that keeps an agent looping all day without babysitting — not a new product to scaffold.
What we currently believe
As of 2026-08-18 there is no single "best" product. Practitioner writeups and vendor docs converge on one outer loop:
wake on a clock or event → read a small durable queue/state file → do one atomic unit in a fresh isolated session → write git/PR artifacts → exit.
The scheduler (cron, OpenClaw heartbeat, Claude Code Routines, Cursor Cloud Agent trigger) is interchangeable. The loop that fails is the one that tries to remember the day inside one context window.
Applied to this vault: keep the outer loop a drain (queue-next → research → promote → ingest → queue-done), not a daemon that never exits. Durable state is the queue + wiki + git. Isolated cloud/CLI runs do the inner work. Human review stays at the merge/ingest gate. Do not invent a new always-on app.
Canonical pages: unattended-all-day-agent-loop, immortal-session-decay-to-unattended-queue-loop.
Evidence we have
- 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: DEV Community —
claude -p+state.md(under 4 KB) + cron + lock; SitePoint — atomic task files, committedCLAUDE.md, isolated sessions, tests as gate, commit-per-task; Sam French — SQS +TODO.md+ "no git push = nothing happened" + exponential backoff after 47 failed re-queues. - From 2026-08-18-autoresearch-effective-all-day-bot-loops: Claude Code Routines (2026-04-14) — fresh session per fire, clones default branch, Pro 5 / Max 15 / Team–Enterprise 25 routine runs per day; auto-mode default 2026-08-14 (89% vs 14% dangerous-command catch); Desktop auto-continue after usage-limit reset.
- From 2026-08-18-autoresearch-effective-all-day-bot-loops: Cursor Cloud Agent best practices — environment first, secrets via OIDC,
agents.md+ skills for a low-context developer. Inner reliability; still needs an outer trigger. - From 2026-08-18-autoresearch-effective-all-day-bot-loops: openclaw heartbeat — usually
HEARTBEAT_OK; default Opus + 30 min ~$15/day; Haiku + 60 min + quiet hours ~$0.60/day. - From 2026-08-18-autoresearch-effective-all-day-bot-loops: Anthropic "Building effective agents" — scheduler should stay a workflow; only the inner unit of work needs to be an agent.
- From 2026-08-18-autoresearch-effective-all-day-bot-loops: boris-cherny 2026-08 Slack
proj-claude-maintains-apps— 388 PRs opened / 180 merged after Claude Code Review + human review.
Evidence we need
- A bake-off of cron vs Routines vs OpenClaw heartbeat vs Cursor Cloud Agents on a research-wiki workload (not coding-agent maintenance).
- How much workspace memory a research bot should rewrite each wake without DEV's optimism-compounding ("great progress today" becoming next-loop belief).
- At what queue depth one-unit-per-wake falls behind a weekday of arrivals.
- Fetched Linear Loops docs (official pages timed out this pass — unconfirmed).
- Re-validate Cherny's 388/180 and the auto-mode classifier catch-rate after the 2026-08 vintage.
How to resolve
Status is narrowed, not resolved: the outer-loop pattern is cited; "best" is not a SKU. Re-open if a measured comparison on this vault's drain appears, or if a product (Linear Loops, a later Routines GA) changes the scheduler/quota picture.
Related
- Queue entry:
ai-loops-with-cursor-and-grok-bot - unattended-all-day-agent-loop
- immortal-session-decay-to-unattended-queue-loop
- parallel-claude-workflow
- claude-md-team-knowledge-base
- agent-output-verification
- claude-code
- cursor
- openclaw
- boris-cherny
- andrej-karpathy