regex-log × 5 with the rebuilt context-hook pruning guard at
COMPACT_AT_TOKENS=15000 — the same experiment that went 0/5 the previous run
(…132733) when the guard still used the fatal ctx.compact().
| trial | result | agent | turns | peak ctx | prunes |
|---|---|---|---|---|---|
| P6fbmcP | PASS | 14m55s | 59 | 25.7k | 48 |
| dsnFToC | FAIL | 4m21s | 15 | 24.6k | 7 |
| i7F2eTe | PASS | 2m09s | 12 | 28.5k | 0 |
| mPwCvjE | PASS | 8m09s | 38 | 23.3k | 26 |
| z7DGFc6 | PASS | 5m24s | 8 | 31.1k | 6 |
The guard is validated. Pruning fired in 4/5 trials (87 prune events
total), every trial ran a complete trajectory to a clean final stop (vs
dying at turn 6–7 under the old guard), and the 59-turn/48-prune trial shows
an agent surviving a long grind because old context kept being trimmed.
4/5 matches regex-log's historical ~90% (27/30 across K≥5 runs).
dsnFToC's regex matched exactly the 9 expected dates — but with two
capturing groups, so re.findall returned tuples
(('2025-01-09','2025-01-09')) instead of strings. Classic §4 near-miss
(one assertion, formatting of the match output); the agent's final summary
shows full knowledge of the task, nothing it needed had been pruned.
Trial i7F2eTe peaked at 28.5k real tokens with zero prunes: its chars/4
estimate never crossed 15000. Measuring per-request usage vs estimate across
all 5 trials: real/est = 1.7–2.1 (log files — dates, IPs, punctuation —
tokenize at ~2 chars/token). Raw, that skew would have made the 180k-est
default fire at ~340–380k real, far past the 262144 cap → the guard would
have missed the very 400s it exists to prevent on dense-content tasks.
Fix (landed right after this run): the guard now calibrates a
real-per-estimated ratio from the requests' actual usage while the history
is still unpruned (frozen after the first prune, clamped to [1,3], max over
the run), and the threshold is therefore ~real tokens. Default restored to
COMPACT_AT_TOKENS=200000 (>60k real headroom). Node tests cover ratio-2
triggering, ratio-1 non-triggering, and the clamp. Prune log lines now include
the ratio; make failures shows prune counts as pr:N.
Re-run this same K=5 at 15000 to confirm the calibrated trigger (expect
prunes in ~5/5 trials incl. short ones, pass ≥4/5), then the two untested
400-victims at defaults: circuit-fibsqrt, make-mips-interpreter.
llama-local/qwen3.6-35b-a3bagentharnesses.minimal_pi:MinimalPithinkingonreasoning budgetdirect (server/none)* — see journal for the authoritative mechanismmaxTokens / contextWindow32768 / 229376agent timeout ×2.0trials5 of 5 — 4 pass · 1 failmean reward0.80tokens (job total)2,287,530 in / 290,488 outstarted / finished2026-07-04T14:07 / 2026-07-04T14:47wall clock39m40s| # | result | total | agent | in/out tok | flags | |
|---|---|---|---|---|---|---|
| 1 | PASS | 15m51s | 14m55s | 1117869/112376 | 🔍 view | |
| 2 | FAIL | 5m16s | 4m21s | 237520/38748 | 🔍 view | |
| 3 | PASS | 3m04s | 2m09s | 203055/21325 | 🔍 view | |
| 4 | PASS | 9m07s | 8m09s | 635809/66367 | 🔍 view | |
| 5 | PASS | 6m20s | 5m24s | 93277/51672 | 🔍 view |