P2: investigate per-turn context growth (chief ~5k/turn, pm 104k-570k, 96% cache_read) #1849

Open
opened 2026-11-06 19:48:03 +00:00 by jason.woltje · 0 comments
Owner

Filed by the MVP3 lead #797 agent for the Lead (Mos), key roundb-2-halt. Investigation only for now; no fix row yet. Source: ui797 Round B, campaign3, 2026-11-06 19:15Z-19:31Z. Evidence: /mnt/storage/scratch/mosaic-lead/mvp3/step14/round-b/c3halt/haltrep.txt (section 2, per-turn usage), state.txt (transcript sizes). Store /srv/mosaic/.mosaic-ui797/bus/bus.sqlite on .53. Support tree 1186cf7b1, model proxy/glm/glm-5.3-flash.

Numbers

About 96% of all campaign3 tokens were cache_read. Context here means input + cache_read per turn.

pm r605148e4905b (launched 19:16:51Z)

  • 20 turns: 19 known plus 1 unknown no-new-usage row, seq 746. 4,588,455 tokens; 96.6% cache_read.
  • First turn (usage seq 575, 19:20:32Z): input 65,379, cache_read 264,832, so context 330,211.
  • Last known turn (seq 743, 19:31:37Z): input 1,053, cache_read 187,648, so context 188,701.
  • Context is not monotonic. It ranges from 104,064 cache_read (seq 604) to 553,984 cache_read (seq 713, context 570,917); other large turns are seq 644 (396k) and 677 (502k).
  • Transcript: 407,597 bytes, 20 turn files.

chief rebc27bb0b748 (launched 19:15:04Z)

  • 40 turns: 39 known plus 1 unknown no-new-usage row, seq 747. 3,492,625 tokens; 96.2% cache_read.
  • First turn (seq 558, 19:17:17Z): input 16,216, cache_read 13,056, so context 29,272.
  • Last known turn (seq 741, 19:31:37Z): input 746, cache_read 115,840, so context 116,586.
  • cache_read grows almost every turn, by about 4-5k: 70,592 → 76,480 → 80,256 → 85,696 → 90,944 → … → 118,912 (seq 613-656), then a drop to 81,600 (seq 660) and a peak of 144,448 (seq 693).
  • Transcript: 364,672 bytes, 40 turn files.

Questions to answer

  1. What makes up each turn's context? Session history replay, the system prompt and contracts, tool results, quoted continuation bodies? Is the whole transcript resent every turn?
  2. Why does the pm swing between 104k and 570k? Large tool results (intake_status, list_requirements, read_spec) kept in history, or compaction?
  3. Is cache_read billed or counted the same as input anywhere it matters? See the supervisor issue: the cap counts it 1:1.
  4. With the echo loop and the duplicate notices fixed, what is the per-turn growth on a clean run?

P2.

Filed by the MVP3 lead #797 agent for the Lead (Mos), key roundb-2-halt. Investigation only for now; no fix row yet. Source: ui797 Round B, campaign3, 2026-11-06 19:15Z-19:31Z. Evidence: /mnt/storage/scratch/mosaic-lead/mvp3/step14/round-b/c3halt/haltrep.txt (section 2, per-turn usage), state.txt (transcript sizes). Store /srv/mosaic/.mosaic-ui797/bus/bus.sqlite on .53. Support tree 1186cf7b1, model proxy/glm/glm-5.3-flash. ## Numbers About 96% of all campaign3 tokens were cache_read. Context here means input + cache_read per turn. **pm r605148e4905b** (launched 19:16:51Z) - 20 turns: 19 known plus 1 unknown no-new-usage row, seq 746. 4,588,455 tokens; 96.6% cache_read. - First turn (usage seq 575, 19:20:32Z): input 65,379, cache_read 264,832, so context 330,211. - Last known turn (seq 743, 19:31:37Z): input 1,053, cache_read 187,648, so context 188,701. - Context is not monotonic. It ranges from 104,064 cache_read (seq 604) to 553,984 cache_read (seq 713, context 570,917); other large turns are seq 644 (396k) and 677 (502k). - Transcript: 407,597 bytes, 20 turn files. **chief rebc27bb0b748** (launched 19:15:04Z) - 40 turns: 39 known plus 1 unknown no-new-usage row, seq 747. 3,492,625 tokens; 96.2% cache_read. - First turn (seq 558, 19:17:17Z): input 16,216, cache_read 13,056, so context 29,272. - Last known turn (seq 741, 19:31:37Z): input 746, cache_read 115,840, so context 116,586. - cache_read grows almost every turn, by about 4-5k: 70,592 → 76,480 → 80,256 → 85,696 → 90,944 → … → 118,912 (seq 613-656), then a drop to 81,600 (seq 660) and a peak of 144,448 (seq 693). - Transcript: 364,672 bytes, 40 turn files. ## Questions to answer 1. What makes up each turn's context? Session history replay, the system prompt and contracts, tool results, quoted continuation bodies? Is the whole transcript resent every turn? 2. Why does the pm swing between 104k and 570k? Large tool results (intake_status, list_requirements, read_spec) kept in history, or compaction? 3. Is cache_read billed or counted the same as input anywhere it matters? See the supervisor issue: the cap counts it 1:1. 4. With the echo loop and the duplicate notices fixed, what is the per-turn growth on a clean run? P2.
jason.woltje added the bug label 2026-11-06 19:48:03 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1849