Skip to content

docs: explain automatic compaction input limits and reserve - #56509

Open
rudycelekli wants to merge 1 commit into
anomalyco:devfrom
rudycelekli:compaction-ceiling
Open

rudycelekli wants to merge 1 commit into
anomalyco:devfrom
rudycelekli:compaction-ceiling

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 17, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #52954

Type of change

  • Documentation

What does this PR do?

Document input-limit precedence, the default reserve and its small-window exception, explicit buffer behavior, and per-field model limit overrides. Updated against current dev: the reserve is now 15%, so the 272,000-token example reserves 40,800 and compacts at 231,200. Preserve the newer full-conversation summary explanation and provider portability text while resolving the conflict.

How did you verify your code works?

  • Checked calculateCeiling, RESERVE_SHARE, the existing 231,199/231,200 regression, and model-limit merge paths against the prose.
  • Source-bound Linux qualification: website typecheck, generated-file check and complete build pass before and after; root bun run check passes. Exact patch and source hashes match head 838dc57.
  • git diff --check passes. This is documentation-only and changes no public API.

Screenshots / recordings

Documentation-only; website build validated.

Checklist

  • I have tested my changes
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new text is accurate. I checked it against calculateCeiling in packages/core/src/session/compaction.ts and the per-field limit merge in packages/core/src/config/plugin/provider.ts. These parts all match the code: input before context, the 16,000-token floor only for windows of at least 32,000 tokens, an explicit buffer replacing the default reserve, the 272,000 → 244,800 example, and no automatic compaction when both limits are unknown. The /providers#models link points at an existing section.

Public API is unchanged (docs only).

No blocking concerns.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(compaction): ceiling doesn't document limit.input vs limit.context precedence; context-only limit overrides are a silent no-op

1 participant