[How Coding Agents Work][12] Task Kinds and the Control Loop
DesignDecode Ken
0:00 / 0:00
[How Coding Agents Work][12] Task Kinds and the Control Loop
4 просмотра · 2 нед. назад
DesignDecode Ken
194 подписчика
4 просмотра · 2 нед. назад
How Coding Agents Work · Module 12 of 29: Task Kinds and the Control Loop
Part II — The Six Layers
Control layer. Codex's loop doesn't run one kind of work. It runs regular turns, compaction turns, review turns, and user-shell turns, each with its own lifecycle — making loop variants first-class instead of special cases wedged into one function.
After this module you can model loop variants as typed tasks rather than conditionals, and handle mid-turn input without corrupting state.
Lessons in this module:
1. The pluggable task abstraction: one interface, four implementations
2. Three scopes of state: session-lifetime, turn-lifetime, and per-sampling-step snapshots
3. Compaction and review as tasks, not side effects
4. Steering: why mid-turn user input joins the current turn instead of starting a new one
5. Suspension, cancellation, and aborting without corrupting state
Prerequisites: module 4.
About the course: Built from the OpenAI Codex harness at commit 8d01cd42fa.