Agentic Harness Workflow: Taming AI Coding with an Engineered Process
Core Event: Agentic Harness Workflow is an engineering framework developed by the author that breaks down AI coding tasks into a linear pipeline of 12 stages. Each stage is handled by a dedicated sub-agent, while the main agent (Manager) oversees scheduling and state management. Human confirmation gates are retained at key checkpoints, and process state is persisted to a workflow-state.json file.
Key Facts:
- Release Status: Self-developed open-source framework (no specific version number or pricing information)
- Availability: The framework is provided as a directory template and supports direct deployment
- Core Capabilities: State persistence, staged sub-agent division of labor, human-in-the-loop gate mechanism
- Agent Topology: 1 main Manager + 10 independent sub-agents (init/specify/plan/tasks/test-plan/plan-review/implement/code-quality/e2e-run/commit-push)
Why Do We Need an Engineered Harness?

The traditional single-agent approach has four major pain points:
- Context bloat and result drift: Requirements, plans, code, and test logs all pile into the same context, making it easy for the agent to forget earlier agreements and deviate from the goal
- Skipping engineering steps: Agents often jump straight into coding, skipping requirements clarification, design review, or test design
- Unrecoverable process: After session compression, restart, or tool switching, it becomes difficult to determine current progress and pending tasks
- Lack of human gates: A wrong direction may run all the way to completion, resulting in extremely high rework costs
The framework’s answer is not to build a smarter agent, but to give AI coding the same structure as software engineering itself: clearly defined processes, explicit handoff points, and mandatory approval steps.
Architecture Core Analysis

12-Stage Lifecycle
Requirements proceed strictly in the following order:
| |
Among these, implement → code-quality → e2e-run forms the automated execution zone, supporting iterative fixes (e.g., returning to coding after a test failure). All other stages pause and wait for human confirmation before proceeding.
Manager: Single Source of State
The main session agent (Manager) wears three hats:
- Scheduler: Determines the next-stage sub-agent based on
state-graph.json - State steward: Exclusively writes to
workflow-state.json, managing the project’s movement betweenactive/process/archiveddirectories - Translator: Converts the user’s natural language into structured instructions for sub-agents, and vice versa
Key design principle: The Manager never reads the body of any artifact (requirements documents, design plans, source code, test reports). It only reads the status (ok/needs_input/fail) and output.next_state fields in protocol responses. This ensures its context remains lightweight and stable even after a dozen or more stage cycles.
Sub-Agent Specialization
Each sub-agent has its responsibilities bounded by an independent Agent.md. A “referee and player separation” mechanism is specifically designed—technical design and review are handled by two different sub-agents, with the latter required to challenge the former’s assumptions rather than just confirming whether the process can run. This draws on the idea of adversarial testing.
General protocol response structure:
| |
State Persistence and Recovery
The process does not rely on chat memory but writes to workflow-state.json. Key fields include:
current_state: Name of the current stagepending: Pending items (forward/cleanup/rollback/acceptance keys)states: Stage history, status, and artifact pathsreview_findings: Issues found at gates and suggested rollback stages
This design supports tool switching (e.g., from Claude Code to Codex) and session restarts—a new agent can simply read the persisted state to resume execution.
Human-in-the-Loop Gate Points
Nine nodes explicitly require human confirmation:
specify: Requirements clarification confirmationplan-review: Design plan reviewhuman-acceptance: Acceptance before code commitcommit-push: Code review confirmationinit/tasks/test-plan/e2e-run: Pause for confirmation after completion
The purpose of each gate and its downstream target stage are recorded in workflow-state.json.
Practical Details and Isolation Mechanisms

Directory Structure Specification
The workspace follows a clear organization:
| |
Each requirement has its own independent directory containing a dedicated workflow-state.json and git worktree, ensuring complete isolation when multiple requirements run in parallel.
Bounded Loop Engineering
When automated tests fail, the framework supports iterative fixes (e2e-run failure → return to implement), but loops are capped. Once the threshold is reached, the agent stops and offers three choices: continue fixing / pass through directly / request an explanation from the sub-agent.
Rollback Logic
All rollbacks follow a unified rule: the target must be a stage in state-graph.json that is already completed and upstream in position. The rollback reason is injected into the target sub-agent’s input, clarifying what it needs to supplement.
Who Should Use This

- Multi-tool collaborative teams: For example, teams mixing Claude Code and Codex—state persistence solves cross-session drift
- Projects with formal review processes: Design reviews, test plan approvals, and code reviews naturally align with the framework’s checkpoints
- Matching requirement granularity: Suitable for medium-to-large feature development, not recommended for tiny changes like single-line bug fixes
- Start cautiously: Individuals or teams with loose processes can start with a subset of stages and simplify usage, then expand to the full process once familiar
Final Thoughts
Agentic Harness proves that the value of a structured process far exceeds that of a standalone agent’s capabilities. By enforcing handoffs, isolating state, and defining explicit human decision points, it transforms AI agents from solo performers into team members fighting in coordination, providing a practical reference paradigm for engineering AI coding.
