GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — (1/9) Claude Code compacts at 200K unless a per-model point raises it by Obed0101 · Pull Request #128 · MendCode/MendCode

Conversation

@Obed0101

@Obed0101 Obed0101 commented Nov 10, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Part 1 of 9, stacked on beta. Its diff is only this change.

CHANGELOG

  • Claude Code sessions compact at 200K tokens even when compactAtTokens is set higher for long-window models; a per-model compactAt still raises it.

Weight: one comparison in the env built when a Claude Code process starts; nothing per turn or at start-up.

Checks: typecheck clean at this head; the full suite passed on the top of the stack (16240 pass).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Obed0101
Claude Code compacts at 200K unless a per-model point raises it: a gl…
2c95e59
…obal compactAtTokens for long-window models only lowers it
@Obed0101

Obed0101 commented Nov 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

MendCode: @Obed0101's MendCode worked on this pull request on one of its devices; released 2026-11-10 18:19 UTC.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Obed0101
Obed0101 commented Nov 10, 2026
View reviewed changes

@Obed0101 Obed0101 left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MendCode review

No findings · nothing in this change was confirmed as a problem
head 2c95e59b7f3a

Merge risk: 🟢 Low · The change adjusts one numeric fallback in an existing shared helper, with no schema, persistence, dependency, or call-structure changes. A regression would primarily affect when Claude Code compacts and the compaction point displayed by its existing reporting paths.
Change: Bug fix · Review effort: 1/5, about 5 minutes

The change caps Claude Code's globally configured compaction point at 200,000 tokens while preserving lower global values and higher per-model or environment overrides. No introduced defects were found after reviewing the implementation, callers, validation, and affected tests; risk is low because the change is narrowly scoped. Tests were not executed in this read-only review, and the supplied performance measurements report no regression above noise.
Readers: 6 code files no reader could read went to the review pass whole (the diff is small: one reader call costs more than the readers' share of this review's cap, so the review pass reads it).

Walkthrough

Claude Code previously inherited global compaction settings even when those settings targeted long-window models. The helper now limits the global fallback to 200,000 tokens without changing the precedence of environment and per-model overrides or the existing feature guards. Existing process configuration, context reporting, and model reporting continue to consume the same helper; native-engine compaction is unchanged.

Changes

Layer / files Summary
Claude Code compaction policy
packages/daemon/src/claude-models.ts
Caps the global compaction fallback at 200,000 tokens while preserving explicit overrides and existing opt-out behavior.
Regression tests
packages/daemon/test/context-truth.test.ts, packages/daemon/test/models.test.ts
Updates expectations for capped global settings and checks lower global values, higher per-model settings, and environment precedence.
Documentation and generated metadata
CHANGELOG.md, docs/claude-code.md, packages/daemon/cards/cards.generated.json
Documents the new fallback policy and updates the generated cards revision without changing card contents.
Pre-merge checks: ⚠️ 1 warning · ✅ 2 passed
Check Status Explanation
Title ✅ Passed The title accurately identifies the 200K cap and the retained ability to raise it per model.
Description ⚠️ Warning The description explains the intended behavior and reports a clean head typecheck, but its full-suite result applies to the top of the stack rather than this isolated head. Its claim of no per-turn work is also imprecise: packages/engine-claude/src/engine.ts:715 invokes the environment callback when checking whether a connection can be reused.
Out of scope ✅ Passed The implementation, tests, documentation, and generated revision update are consistent with the stated compaction-policy change.
Review details
  • Files reviewed: 6 · 17 changed lines · estimated review effort 1/5, about 5 minutes
  • Profile: normal · at most 8 inline comments
  • Verification: the review pass raised no candidate findings, so no separate pass was needed
  • Cost: 181,848 tokens in (153,344 from the provider's cache) · 1,686 out
  • Readers: 6 code files no reader could read went to the review pass whole (the diff is small: one reader call costs more than the readers' share of this review's cap, so the review pass reads it).

Performance (perf-attrib, base c0516da against head 2c95e59)

perf-attrib: igual: nothing above the measured noise

base c0516da2078ccf2cdcd2c6688e567b10b48ac29c (c0516da2) vs cand 2c95e59b7f3a05988396170baea350d411e8a2a4 (2c95e59b, cached build), median of 2 faux-engine session(s) per side; flagged = beyond the noise measured on 18 base-vs-base runs (x1.5).

metric base cand diff
tui.after.fp_mb 57.4 57.1 -0.3
tui.after.peak_mb 73.2 73.1 -0.1
tui.ready.fp_mb 54.9 54.9 0
tui.ready.peak_mb 73.2 73.1 -0.1
tui.rest.fp_mb 56.9 56.5 -0.4
tui.rest.peak_mb 73.2 73.1 -0.1
tui.after.rss_mb 136.5 135.8 -0.7
tui.ready.rss_mb 114 114.1 +0.1
tui.rest.rss_mb 136.5 135.8 -0.7
tui.after.heap.extra_b 5742500 6778245 +1035745
tui.after.heap.objects 238306 240813 +2507
tui.after.heap.protected 19 19 0
tui.after.heap.size_b 23149012 24445397 +1296385
tui.ready.heap.extra_b 2871766 2895000 +23234
tui.ready.heap.objects 216397 216466 +69
tui.ready.heap.protected 18 18 0
tui.ready.heap.size_b 19241750 19273455 +31705
tui.rest.heap.extra_b 3774179 4668849 +894670
tui.rest.heap.objects 235291 237655 +2364
tui.rest.heap.protected 18 18 0
tui.rest.heap.size_b 20924979 22060450 +1135471
tui.rest.js_code_b 4924995 5878816 +953821
tui.rest.js_live_b 19202727 19237774 +35047
tui.cpu_ms.after 5922 5928 +6
tui.cpu_ms.ready 358 353 -5
tui.cpu_ms.rest 534 523 -11
binary.bytes 72290528 72290528 0
disk.bytes 4106 4113 +7
disk.bytes_per_session 2053 2057 +4

JS heap bytes by constructor that rose:

  • tui.rest.ctor.native:Blob.bytes: 1738553 -> 1738720 (+167)
  • tui.rest.ctor.closure:G.bytes: 2721 -> 2753 (+32)
  • tui.rest.ctor.object:ModuleRecord.bytes: 5501477 -> 5501493 (+16)

Modules loaded at start: 230 -> 230, 4629956 -> 4629972 bytes of chunks; chunk sizes only in cand: [5932], only in base: [5916] (chunk names are hashes: the list says which changed in size, not by what name)

Reference (skill, 2026-11-03, real model): footprint 64 ready / 66 after / peak 80 MB, 2.6 KB per session. This run (faux engine, whole process tree): 54.9 / 57.1 / peak 73.1 MB, 2057 B per session.

Files (6)
  • CHANGELOG.md
  • docs/claude-code.md
  • packages/daemon/cards/cards.generated.json
  • packages/daemon/src/claude-models.ts
  • packages/daemon/test/context-truth.test.ts
  • packages/daemon/test/models.test.ts

Comment @mendcode review to review again · @mendcode pause / resume · reply to a finding with explain, fix or learn · settings in .mendcode/review.yaml

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Obed0101 Obed0101 mentioned this pull request Nov 10, 2026
(2/9) Usage counts include Claude Code compaction tokens #129
Merged
@Obed0101
Obed0101 merged commit 3b2bcd4 into beta Nov 10, 2026
6 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Obed0101
Obed0101 deleted the beta-pr/1-claude-compact-point branch November 10, 2026 19:24
@Obed0101 Obed0101 mentioned this pull request Nov 10, 2026
v0.0.14 #142
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Obed0101
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.