Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6jDW7zqoKDMTRrCyq
32 lines
1007 B
Plaintext
32 lines
1007 B
Plaintext
# A session is an append-only log; the active view is a projection of it
|
|
|
|
After 5 turns, the log holds 10 events and the model would see 10 messages:
|
|
1 MESSAGE U:u1
|
|
2 MESSAGE A:a1
|
|
3 MESSAGE U:u2
|
|
4 MESSAGE A:a2
|
|
5 MESSAGE U:u3
|
|
6 MESSAGE A:a3
|
|
7 MESSAGE U:u4
|
|
8 MESSAGE A:a4
|
|
9 MESSAGE U:u5
|
|
10 MESSAGE A:a5
|
|
|
|
compact(trigger: more than 3 turns, strategy: keep last 2 turns):
|
|
unchanged=false covered=6 preserved=4 pinned=0
|
|
|
|
The log now holds 11 events (nothing was removed, one COMPACTION boundary was appended):
|
|
1 MESSAGE U:u1
|
|
2 MESSAGE A:a1
|
|
3 MESSAGE U:u2
|
|
4 MESSAGE A:a2
|
|
5 MESSAGE U:u3
|
|
6 MESSAGE A:a3
|
|
7 MESSAGE U:u4
|
|
8 MESSAGE A:a4
|
|
9 MESSAGE U:u5
|
|
10 MESSAGE A:a5
|
|
11 COMPACTION payload=[coveredEventCount, pinnedEventIds, preservedEventIds, strategy, summaryEventIds, tokensEstimatedSaved]
|
|
|
|
The active view (what the next prompt starts from): U:u4 | A:a4 | U:u5 | A:a5
|