C.W.K.
Stream
Lesson 03 of 05 · published

The Tail: Live State and Next Action

~22 min · state, next-action, tail

Level 0Window Watcher
0 XP0/50 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

The tail is where decisions land

The tail holds the freshest material: the current user question, the latest diff, the most recent tool result, the next intended action. It is always volatile and should always sit at the very end of the input. This puts it both inside the recency-attention zone and outside the cached prefix, where it belongs.

One question per turn

Multi-question tails confuse priority. Pick one objective per turn; if more is needed, sequence them across turns or mark them with explicit numbering and a clear 'address them in order' instruction. A pile of equally-weighted asks is a pile the model will reorder by its own preference.

State snapshot, not state diary

The tail should include current operational state — branch name, pending action, last tool exit code — not the full history of how that state was reached. History belongs in the body if needed for context, or in a separate handoff if needed across sessions.

Code

Clean tail·xml
<state>
  branch: feature/auth-cleanup
  last_tool: pytest -> 0 (passed)
  pending: review diff and propose tests
</state>

<task>
  Summarize the diff in three bullets.
  Then propose two test cases that would have caught the original bug.
</task>
Anti-pattern: tail with sticky junk·markdown
BAD: tail mixes new question, three old questions still unanswered,
     a banner timestamp, and an unrelated tip.

GOOD: tail = exactly one question + the live state needed to answer it.

External links

Exercise

Take one of your long sessions. Look at the last user message. Identify everything in it that is not the actual current ask. Move that material to a state snapshot, the body, or delete it.
Hint
If the message contains three sentences that were true two turns ago, those sentences are body or state, not tail.

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.