Initializer-Maintainer Dual Agent Architecture
Uses a one-time initializer agent to create the feature list, progress files, and bootstrap script, then a coding agent that resumes from them one feature per session
Add to Pack
Saved locally in this browser for now.
Cite This Pattern
Nikola Balic (@nibzard) (2026). Initializer-Maintainer Dual Agent Architecture. In *Awesome Agentic Patterns*. Retrieved October 14, 2026, from https://agentic-patterns.com/patterns/initializer-maintainer-dual-agent
@misc{agentic_patterns_initializer-maintainer-dual-agent,
title = {Initializer-Maintainer Dual Agent Architecture},
author = {Nikola Balic (@nibzard)},
year = {2026},
howpublished = {\url{https://agentic-patterns.com/patterns/initializer-maintainer-dual-agent}},
note = {Awesome Agentic Patterns}
} Use when
- Projects need many agent sessions over days or weeks
- Applications have many discrete features to track
- Context loss between sessions is costly
Avoid when
- Small, single-session tasks
- Exploratory or research projects with no clear feature list up front
Problem
Long-running agent projects face distinct failure modes at different lifecycle stages:
- Project initialization requires comprehensive setup: environment configuration, feature specification, test infrastructure, and progress tracking systems
- Incremental development requires reading prior context, selecting the next task, implementing, and verifying—repeatedly across many sessions
- Single-agent approaches either over-engineer each session (wasting setup time) or under-invest in foundations (leading to drift and confusion)
- Session boundaries create context loss, causing agents to restart from scratch or lose track of project state
Solution
Implement a two-agent architecture with lifecycle-specialized responsibilities. In the reference implementation both roles are the same harness with only a different initial user prompt (the system prompt, tools, and harness are identical); "two agents" is a prompt-level distinction, not two deployed systems.
1. Initializer Agent (runs once at project start):
- Creates the immutable feature list with all requirements (the artifact and its enforcement rules are covered in Feature List as Immutable Contract)
- Establishes progress tracking artifacts (e.g.,
progress.txt) - Sets up environment bootstrap scripts (e.g.,
init.sh) - Configures testing infrastructure
- Makes first git commit with foundational structure
2. Maintainer/Coding Agent (runs in subsequent sessions):
- Executes session bootstrapping ritual:
- Verify working directory (
pwd) - Read git logs and progress files
- Read feature list and select next incomplete feature
- Run bootstrap script to start services
- Run existing tests before implementing new features
- Verify working directory (
- Works on one feature at a time
- Commits after each verified feature
- Updates progress artifacts
How to use it
Best for:
- Projects requiring many sessions to complete (days/weeks of agent work)
- Complex applications with 50+ discrete features
- Scenarios where context loss between sessions is costly
- Teams using agents for sustained development, not one-shot tasks
Implementation steps:
-
Design the Initializer prompt: Focus on comprehensive upfront planning
- Feature list with detailed acceptance criteria
- Environment setup automation
- Progress tracking file structure
-
Design the Coding Agent prompt: Focus on incremental progress
- Session bootstrapping ritual (read context first)
- Single-feature focus
- Mandatory testing before marking complete
- Commit discipline
-
Define the handoff artifacts: the feature list is specified in Feature List as Immutable Contract; this pattern adds the progress log and the one-command bootstrap script on top of it.
Trade-offs
Pros:
- Clear separation of concerns between setup and execution
- Session bootstrapping ritual prevents context loss
- Mirrors effective human team practices (shift handoffs)
- Initializer creates consistent foundation for all future sessions
- Git history + progress files provide rich context for new sessions
Cons:
- Requires upfront investment in comprehensive feature specification
- Two different prompts/configurations to maintain
- Initializer must anticipate needs of Coding Agent
- Not suitable for exploratory or research-oriented projects
- Overhead is wasteful for small, single-session tasks
References
- Anthropic Engineering: Effective Harnesses for Long-Running Agents
- Cursor: Scaling long-running autonomous coding (January 14, 2026)
- Related: Feature List as Immutable Contract — owns the feature-list artifact and its enforcement rules. Distinct from that pattern: this one owns the session lifecycle (who runs once, who runs repeatedly) around that artifact.
- Related: Planner-Worker Separation for Long-Running Agents — splits planning from execution at runtime. Distinct from that pattern: this one separates project bootstrap from incremental delivery over the project's lifetime, and both roles share one harness.
- Related: Filesystem-Based Agent State
- Related: Proactive Agent State Externalization