Building and Analyzing a Minimal Coding Agent Harness
Описание и применение
Автор построил кодировочного агента с нуля, чтобы понять принципы дизайна, сравнив его с референсным проектом 'pi'. Выяснилось, что 'минимализм' означает дисциплинированный отказ от лишних функций (MCP, субагенты) при глубокой проработке основных инструментов. Автор перенял паттерны обработки усеченных выводов и детерминированного оценивания.
Задача
Understanding the true meaning of 'minimal' in coding agent design by building a custom harness and comparing it against a reference implementation (pi), avoiding the trap of superficial copying.
Результат
The author learned that 'minimal' in agent design refers to disciplined scope rather than small code size. By building first, they gained deep insight into why certain features (like compaction and robust edit tools) are necessary, and identified critical bugs in their own implementation regarding truncated outputs and evaluation metrics.
Рабочий процесс
- Build a coding agent harness from scratch without looking at reference implementations.
- Define a strict set of tools and constraints (e.g., no MCP, no subagents).
- Implement a basic evaluation suite to measure agent performance.
- Read the source code of a reference implementation (pi) to compare design decisions.
- Diff the implementations to identify where reasoning diverged.
- Verify assumptions by inspecting source code directly (e.g., checking grep matches) rather than trusting surface-level metrics.
- Adopt robust patterns from the reference, such as handling truncated outputs and deterministic judging.
Доказательства
The edit tool alone is 443 lines... Compaction arrived because long sessions genuinely need it.
pi checks whether the model's output was cut off by the token limit, and if so refuses every tool call in that message
pi's 'judge' isn't an LLM. createJudge() is a deterministic multi-criteria scorer.
- Дата записи: 2026-09-05T14:13:17.190Z