Every-10-turns get_global_memory() injection accumulates full L1 copies in history
ga.py re-injects the whole get_global_memory() text (L1 + fixed structure, ~9K chars on my setup) into next_prompt every 10 turns (elif turn % 10 == 0: next_prompt += get_global_memory(), added in bb2d595 as a reminder). The system prompt already carries the same text on every request, and the injected block is plain text: compress_history_tags only folds tagged blocks (<history>, <key_info>, <earlier_context>, thinking/tool tags), so old copies are never folded and stay in history until a hard trim.
Measured by driving trim_messages_history for 200 turns with a 9K-char block injected every 10 turns: up to 10 full copies sit in history at once and the hard trim fires twice. In long sessions this is a steady per-request cost that only grows with L1 size.
Proposal (2-line change, no new mechanism): wrap the injection in <global_memory>…</global_memory> and add global_memory to the _hist_pat alternation in compress_history_tags — the same way <history> is already injected periodically and folded. The reminder semantics stay (the most recent copy is complete), old copies fold to <global_memory>[...]</global_memory>. With the change the same simulation peaks at 2 copies (cut_msg_interval=7) or 3 copies (25, the deepseek default) instead of 10, and the hard trim fires once instead of twice. Old copies are folded lazily on the next compression pass, so a couple of full copies still coexist; the goal is bounding the accumulation, not exact dedup. PR follows.