- estimateSystemPromptTokens now uses estimateTokens() (chars/4) instead of chars/2, eliminating the 2x overestimate that caused pre-flight compaction to fire on every LLM call at small context windows - ESTIMATION_SAFETY_MARGIN reduced from 1.5 to 1.2, increasing usable context from ~53% to ~73% before compaction triggers At 200k context, effective usable tokens before compaction improved from ~86k to ~120k message tokens (39% increase). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| package.json | ||
| tsconfig.json | ||
| tsup.config.ts | ||