Loop Engineering
You stop prompting agents. You design systems that prompt them. Loop engineering is the next abstraction layer above prompt engineering.
Definition
What is loop engineering?
The shift from prompting to systems design.
Boris Cherny, creator of Claude Code at Anthropic: “I don't prompt Claude anymore. I have loops running that prompt Claude and figuring out what to do. My job is to write loops.”
Loop engineering is designing a small system that finds work, hands it to agents, checks the output, records what's done, and decides what's next. You define the goal and the constraints. The system pokes the agents instead of you.
The progression: autocomplete (2023) → prompting AI to write code (2024) → running multiple agents in parallel (2025) → writing loops that do the prompting themselves (2026).
“You shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents.”
Primitives
The five building blocks
Both Claude Code and Codex ship all five. A loop needs primitives and a place to persist state.
Automations
Discovery and triage on a schedule. Define a task, a cadence, and a stopping condition. The loop finds work and acts on it while you sleep.
/loop, /goal, hooks, GitHub Actions
Worktrees
Isolated branches so parallel agents don't collide. Each loop gets its own checkout. One agent's edits can't touch another's working directory.
git worktree, --worktree flag
Skills
Codified project knowledge so agents stop re-learning every session. Conventions, build steps, architecture decisions written once and read every run.
SKILL.md files, $skill invocation
Connectors
MCP-based integrations that let the loop touch your real systems. Issue trackers, databases, staging APIs, Slack.
MCP servers, plugins, tool permissions
Sub-agents
Split the maker from the checker. The model that wrote the code doesn't grade its own homework.
.codex/agents/, .claude/agents/
State / Memory
A markdown file, Linear board, or any store that outlives the conversation. The agent forgets between runs. The repo doesn't.
Example
What a loop looks like
Daily triage loop — concrete, not abstract.
Automation triggers. Calls a triage skill that reads CI failures, open issues, and recent commits.
Findings written to state file. For each actionable item, opens an isolated worktree.
Sub-agent drafts the fix. Second sub-agent reviews against project skills and tests.
Connectors open PR, link Linear ticket, ping Slack. Anything it can't handle lands in your triage inbox.
Loop picks up where yesterday stopped. State file remembers what was tried, passed, remains open.
You designed it once. The loop finds work, acts on it, verifies itself, and reports back.
Team scale
Where loops break at team scale
Individual loops work. Organizational loops need coordination.
Developer A's morning triage loop “fixes” a test that Developer B's refactoring loop intentionally changed. B's loop reverts A's fix that night. Neither person is awake for either event.
No shared context
Each developer's loops operate in isolation. No loop knows what other loops are currently changing across the org.
No governance
A loop can violate architectural boundaries, touch services it shouldn't, or deploy at 3am.
No observability
When ten loops run across a team, nobody has a unified view of what they're collectively doing to the codebase.
No coordination
Worktrees isolate one developer's loops from each other. They don't isolate one developer's loops from another's.
Platform
LoomStack: the orchestration layer for loops
Individual loops sit above individual prompts. LoomStack sits above individual loops.
Shared context
Every loop reads from and writes to shared organizational memory. Loops know what other loops are doing.
Policy enforcement
Governance rules evaluated before a loop's changes land. Loops respect boundaries without each developer configuring them.
Observability
Unified view of all loop activity across the org. Trace any production change back to the loop that made it.
Coordination
Conflict detection across loops before they compound. Developer A's loop and Developer B's loop don't work against each other.
Coordinate your loops at organizational scale
LoomStack is the orchestration layer above individual loops. Shared context, governance, observability, and coordination so your team's loops work together.