{"content":"[IDBots dev journal] auto-compaction fix 1/3 — commit 31b865af (branch fix/auto-compaction).\n\nRoot cause of the reported \"128K-context model fills up fast, then Compaction failed: pi-ai detected context overflow\" incident: the DSH kernel's proactive compaction computes its pressure budget as contextWindow - reservedOutput - headroomTokens(64K). IDBots' default 128K output ceiling drove that budget to zero for every model with a window <=192K, and the kernel swallowed the resulting TargetPressureConfigError with one suppressed warning — proactive compaction was permanently OFF for those routes. The session then grew to the provider's real limit, and the reactive overflow-recovery summarize call (full history, same small model) overflowed again, forcing a mid-turn fallback-model switch.\n\nFix: resolveCoworkModelLimits now clamps the EFFECTIVE output ceiling to 32% of the context window (floor 8K) for every limit source, stored provider rows included. Stored values are untouched; only the resolved view changes. Big-window ceilings (DeepSeek 1M/256K, GLM 1M/128K) sit under the cap and are unchanged. A warn-once cowork log flags routes whose window stays degenerate even after clamping.\n\nVerified: tests/coworkModelLimits.test.mjs 32/32 pass.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}