From 5b05af91fa3fcc9ae7aff00feedc26d062babbc2 Mon Sep 17 00:00:00 2001 From: Agando Date: Fri, 23 Oct 2026 21:43:45 +0200 Subject: feat(newos4): context window warns at 80% and says what trimming dropped (v4.6.91) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit P0-5 asked what to do about a 422k-token session against a 400k threshold. There is no 400k threshold in this tree β€” the budgets are maxContextTokens (12000) and maxContext*2 messages β€” so rather than chase a number that does not exist, this applies the decision that is defensible either way: warn before the cliff, never lose history without saying so. - 80% of the token budget prints one warning per crossing (no per-turn nagging) - the message-count trim unshifts a marker naming how many messages left the window and quoting the earliest one, instead of splicing them away silently - 'max-context-tokens (default: 2000)' now reports the real code default, 12000 Verified: 900/1000 tokens -> warns once, second call silent; 1500/1000 -> compresses to 17 messages with the summary head intact; 9-message window with maxContext=2 -> 4 messages, marker '[context trim: 6 earlier message(s) ... earliest was: "turn 0 ..."]'. --- help.html | 19 +++++++++++++++++++ main.html | 6 +++--- modules/core/core-bundle.js | 29 ++++++++++++++++++++++++++--- modules/core/module-aiassist.js | 29 ++++++++++++++++++++++++++--- modules/core/module-loader.js | 2 +- 5 files changed, 75 insertions(+), 10 deletions(-) diff --git a/help.html b/help.html index a464d5f..4eec9ef 100644 --- a/help.html +++ b/help.html @@ -1688,6 +1688,25 @@ listmods

πŸ“‹ Changelog

+
+
v4.6.91 β€” October 2026 + context says what it dropped
+
    +
  • The window warns before it forgets. At 80% of the token budget the + terminal says so once β€” ⚠️ Context 90% full (900/1000 tokens) β€” instead of + only announcing the fall after compression. It does not repeat on every turn.
  • +
  • Trimming leaves a marker. Old turns used to vanish silently, so a long + task "remembered" a conversation that never started that way. The window now opens with + [context trim: 6 earlier message(s) left this window β€” the earliest was: "turn 0 + original brief text…"].
  • +
  • The help text stopped lying. max-context-tokens claimed a + default of 2000; the code has always used 12000.
  • +
  • On the "400k / 422k" report: no such limit exists in this codebase β€” + the only budgets are maxContextTokens (12 000) and maxContext Γ— 2 + messages. That figure came from outside the app; nothing here was changed to chase it.
  • +
+
+
v4.6.88–90 β€” October 2026 one phantom entry, three bugs
diff --git a/main.html b/main.html index 16b4d63..921c8a8 100644 --- a/main.html +++ b/main.html @@ -1349,13 +1349,13 @@ - + - + - +