A thread you can test
Sessions & Loops
4 notes move from the word to a real choice at work — understand it first, then decide whether to use it.
Each note stands alone, or becomes the next step in this thread.
THE QUESTION THIS PAGE ANSWERS
ANSWER FIRSTWhat is Sessions & Loops, and which AI decisions does it change?
Starting from the byte-for-byte check in invariant.ts: why everything the model sees must be reconstructable from the log This page keeps the related concepts, common mistakes, and practical notes in one reading thread.
First decide whether you are blocked by a definition, a choice, or verification; then choose the closest of the 4 notes below.
Start with “Model-visible ⟺ logged: An Invariant That Crashes in Your Face,” then restate the conclusion using your own task.
Do not treat every method in a topic as interchangeable. The answer changes with the input, risk, and acceptance bar.
THIS QUESTION THREAD
Put the word back inside the choice it changes.
Model-visible ⟺ logged: An Invariant That Crashes in Your Face
Starting from the byte-for-byte check in invariant.ts: why everything the model sees must be reconstructable from the log
followup / steer / inject: Dual-Queue Inbox
Break down enqueue, claim, and wake semantics for the next-turn and next-step queues, and contrast Claude Code’s interrupt model
What Happens After Esc: Cancel, Crash Recovery, and Re-entry
One AbortSignal per turn; write the log even on interrupt; crash, restart, and keep going
Goal: Provenance Is Permission
How long-term goals are stored, who may change them—auth looks at message provenance