Coder Agent
The Coder agent role, CodeDiff generation, and hunk-based editing.
The Coder Agent (⟠)
The Coder receives the TaskSpec produced by the Planner and generates precise code modifications.
What the Coder Does
- Focused Implementation: Implements only the files and modifications specified in the
TaskSpec. It is instructed not to introduce unsolicited refactors or unrelated changes. - Unified Diff Generation: Emits structured search/replace hunks (
CodeDiff) with exact indentation and context lines. - Spec Adherence Check: Explains how each change satisfies the specific acceptance criteria defined by the Planner.
- Handling Feedback: When the Reviewer rejects a draft or requests changes, the Coder receives the
ReviewFeedbackartifact and writes a targeted revision without starting from scratch.
Recommended Configuration
[agents.coder]
provider = "anthropic"
model = "claude-sonnet-4-20250514"
max_tokens = 8192
temperature = 0.2