Skip to content
C.W.K.
Stream
Lesson 04 of 05 · published

Caps, Cuts, and Breakers

~12 min · caps, safety, loop

Level 0Cold Stick
0 XP0/41 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

A Cap Is a Recorded Stop

Caps, when configured, are recorded stops — steps, tokens, wall clock, context, child depth, child count. A cap is not an exception you catch and hide. It is a stop reason the record can replay. Interactive turns have no step cap by default because the operator is watching and can interrupt. Headless run has no operator, so it carries a finite floor — a hundred and twenty steps and an hour unless the operator explicitly chooses unlimited. Delegates keep their own finite caps. Unlimited never means unbounded-on-nonsense.

Two repetition breakers end a turn independent of any step cap. Five consecutive steps whose calls never became executable close as invalid-calls: the engine's correction is not landing. Six identical back-to-back call sets close as no-progress. An executable call resets the invalid counter. Those numbers are product sentences, not magic. They exist because a small model will otherwise thank you forever for a schema error it keeps repeating.

Cuts Are Not Errors You Paper Over

A transport that ends before a terminal event is a cut. Partial blocks stay in the record and stay out of the transcript. Resume continues from the last durable step. The Claude agent-class wall that can end a heavy turn without a result message is the same kind: named, recorded, not retried by hope. Context overflow is a typed stop before transport when the estimate hits the window, or a mapped HTTP 400 when the daemon finally tells the truth under truncate: false.

Uncapped is a choice you write down, not a default you inherit. A headless run that can spin until the disk fills is not a cleanroom feature. It is an unattended process with a model's appetite.

Code

Stops the loop may name without guessing·text
end_turn          model stopped, no complete calls
tool_use          complete calls remain to execute
max_tokens        length budget hit
context_overflow  estimate or daemon refused the window
cap:invalid_calls 5 consecutive non-executable call steps
cap:no_progress   6 identical call sets in a row
cut               transport ended before a terminal event
aborted           operator interrupt mid-stream
error             typed failure, including record_write_failed

External links

Exercise

Watch a small model miss a required tool argument. Count how many times it retries the same call. Write the breaker that should have fired, and the stop reason you want in the record. If your current tool just lets it spin, you have measured why these caps are product, not paranoia.
Hint
The useful number is consecutive non-executable steps, not total steps. A later good call should reset the counter.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.