LAYER 03 · Trace the agent spine

Inbox, turns, and steps

How one user task contains multiple model calls, parallel tools, and mid-turn steering

20 min3 source anchorsupstream@47f9438
turn ⊃ step → tool debt → next step
The question this chapter resolves

Why does one user message not imply one model request?

Build intuition

A turn is an unsettled work ticket; a step is one processing round. Tool results, steering, or turn-stopping obligations may schedule another round under the same ticket.

MECHANISM

Mechanism

followup queues a normal next turn, steer targets the nearest step boundary, and inject queues context without waking an idle agent. The driver claims one next-step batch at a time.

Tool calls are classified into barriers or a bounded rolling concurrency pool. Results are still post-processed and logged in authoritative model order.

Step 1 of 6

Open turn

Write the durable boundary before claiming input.

INVARIANTS

What extensions must preserve

  • A turn opens before first claim and closes even if rejected
  • A step is one model-request boundary
  • Natural stop must cross agent/turn-stopping
FAILURE MODES

The tempting wrong turns

  • ×Inferring step count from message count
  • ×Conflating steer and followup
  • ×Letting parallel completion order define model history order
VERIFY IN SOURCE

Do not trust the conclusion—verify it

These anchors are pinned to official deepseek-harness@47f9438; account for later breaking changes when reading current upstream.

KNOWLEDGE CHECK

Pause for ten seconds before revealing

Why does inject not wake an idle agent?

Why the next chapter follows

Every step assembles a fresh request header before calling the model. Next we unpack prompt assembly.

Learn DeepSeek Harness

An independent learning project. Explanations derive from source; upstream remains authoritative.