Modern coding agents do not share one standard implementation, but they are increasingly converging on a reusable runtime pattern.
The strongest current candidate for that pattern is a guarded tool-result loop:
- the agent works through explicit tool calls,
- tool results are fed back into the next turn,
- failures remain recoverable and in-band,
- completion is explicit and must be validated,
- runtime state is inspectable outside the transcript,
- context compaction and resumability are runtime concerns,
- hooks and policy layers sit around the loop rather than replacing it.
- tool-result loop,
- explicit completion attempts,
- guarded completion,
- recoverable tool failures,
- command-output streaming,
- minimal runtime state exposure.
- journaling format,
- exact compaction protocol,
- stop-hook standardization,
- subagent orchestration details,
- durable resume and checkpoint interfaces.
If this repo had to be opinionated today, it would say that the right abstraction layer is neither the raw SDK layer nor a full workflow engine. It is a narrower runtime layer that defines task lifecycle, turn execution, completion gating, failure reinjection, state, compaction, and bounded delegation.