mirror of
https://github.com/teamchong/pxpipe.git
synced 2026-07-22 02:02:51 +02:00
06a8b70c01
Volatile env/context text (git status, cwd, date) rode in req.system — BEFORE the slab anchor in Anthropic's prefix order (tools → system → messages) — so any git-state change cold-restarted the entire anchored prefix. Telemetry attribution (events.jsonl 2026-06-26..07-02): 48.8% of cold-create waste, ~2.6k tokens/session vs ~200 saved by imaging it. Now appended as a trailing text block on the LAST user message — the per-turn live tail that re-caches incrementally anyway — placed AFTER history collapse (never baked into frozen chunks) and after tool_result compression. Session-stable billingLine/sysRemainder stay in system; fallback keeps env in system when no user message exists to carry it. New telemetry field: envRelocatedChars.