Research Sources
All sources investigated during the design of agent-loops.
1. Claude Agent Loop (Anthropic)
- URL: https://code.claude.com/docs/en/agent-sdk/agent-loop
Key Concepts
- Agent loop: prompt → evaluate → execute tools → repeat until no tool calls
- Subagents start with fresh context (no parent history)
- Only final response returns to parent
- Tools: built-in (Read, Edit, Bash, Glob, Grep) + MCP + custom
- Turns and budget:
max_turns, max_budget_usd
- Effort levels: low, medium, high, xhigh, max
- Automatic compaction when context fills
- Maker vs checker split for verification
What We Adopted
- Subagent pattern (container-per-agent = context isolation)
- Maker/checker split with different models
- Tool scoping per agent role
- Compaction-aware state management
2. Loop Engineering (Addy Osmani)
- URL: https://addyosmani.com/blog/loop-engineering/
Key Concepts
- 5 primitives: Automations, Worktrees, Skills, Plugins/Connectors, Sub-agents
- 6th: State/Memory on disk (not in context)
- “The model forgets everything between runs so the memory has to be on disk”
- Skills = intent written down, not re-derived every cycle
- Maker vs checker: “the most useful structural thing in a loop”
- “Two people can build the exact same loop and get completely opposite results”
What We Adopted
- Worktrees for isolation (git worktree per task)
- Skills as project knowledge codified in SKILL.md
- Memory on disk (SQLite board, not in LLM context)
- Maker/checker pattern
- State file as spine of the system
3. Boris Cherny / Loop Engineering Philosophy
- Via: Acquired podcast + productmarketfit.tech article
- URL: https://www.productmarketfit.tech/p/stop-prompting-ai-and-start-building
Key Concepts
- “I don’t prompt Claude anymore. I have loops running.”
- Underfund principle: understaff → forces automation
- Shift budget from humans to tokens
- Loop = recursive goal with AI iterating until complete
- “Designing loops is harder than prompt engineering, not easier”
What We Adopted
- Infinite loop as core operating mode
- The orchestrator doesn’t prompt, it manages loops
- Budget awareness (cheaper models for decomposer/checker)
4. iteratr (mark3labs)
- URL: https://github.com/mark3labs/iteratr
Key Concepts
- Go binary using KIT SDK (opencode in-process, not subprocess)
- NATS JetStream for state persistence (event-sourced)
- MCP tools server: task-add, task-update, task-list, task-next, note-add, note-list, iteration-summary, session-complete
- Lifecycle hooks: session_start, pre_iteration, post_iteration, on_task_complete, on_error, session_end
pipe_output: hook output sent to agent for self-correction
- Headless mode for CI/CD
- Auto-commit with file tracking
- Subagent support via KIT SDK
- Iteration #0 = planning phase (fresh sessions)
NoSession: true = ephemeral sessions per iteration
What We Adopted
- iteratr as agent runtime (inside Docker containers)
- Lifecycle hooks with
pipe_output
- Task tracking pattern (tasks with status, priority, dependencies)
- Notes system for learnings between iterations
- Headless mode for server deployment
- Auto-commit for git integration
5. Hermes Kanban (Nous Research)
- URL: https://hermes-agent.nousresearch.com/docs/user-guide/features/kanban
Key Concepts
- SQLite kanban board shared across agents
- 7 task states: triage, todo, ready, running, blocked, done, archived
- Dependency graph with auto-promotion (todo → ready when parents done)
- Worker context: task + parent results + prior attempts + comments
- Auto-decompose: LLM splits triage tasks into subtask graph
- Circuit breaker: auto-block after N failures
- Crash recovery: reclaim stale running tasks
- Structured handoff: summary + metadata in
kanban_complete
- Boards: multi-project isolation
- Goal mode: keep running until acceptance criteria met
- Idempotency keys for dedup
What We Adopted
- SQLite board (not NATS, simpler for our scale)
- 7 task states with transition rules
- Dependency graph with auto-promotion
- Worker context (parent results passed to children)
- Auto-decompose via LLM
- Circuit breaker pattern
- Crash recovery / reclaim stale
- Structured metadata handoff between stages
- Multi-board (tenant) support
- Idempotency keys
Adoption Summary Table
| Concept |
Source |
Implementation |
| Container-per-agent |
Claude subagents + our innovation |
Docker isolation per task |
| Kanban board |
Hermes |
SQLite with 7 states |
| Dependency graph |
Hermes |
task_links + auto-promotion |
| Worker context |
Hermes |
Parent results + prior attempts |
| Auto-decompose |
Hermes |
LLM splits triage tasks |
| Maker vs Checker |
Addy Osmani |
Different models per role |
| Memory on disk |
Addy Osmani |
SQLite, not LLM context |
| Infinite loop |
Boris Cherny |
dispatcher.js 30s tick |
| iteratr runtime |
iteratr |
KIT SDK in-process |
| Lifecycle hooks |
iteratr |
.iteratr.hooks.yml per role |
| pipe_output |
iteratr |
Agent sees test/lint failures |
| Task tracking |
iteratr |
MCP tools via KIT SDK |
| Notes system |
iteratr |
Learnings persist between iterations |
| Git worktrees |
Addy Osmani |
One per task for isolation |
| Circuit breaker |
Hermes |
Auto-block after N failures |
| Crash recovery |
Hermes |
Reclaim stale running tasks |