Skip to content

fix: keep compression reachable at 64k context#14878

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/context-compression-threshold-14690
Open

fix: keep compression reachable at 64k context#14878
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/context-compression-threshold-14690

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • keep ContextCompressor threshold percentage-based when the 64K floor would otherwise push it to the full context window
  • reuse the same threshold calculation in init and update_model
  • add regression tests for exact-64K initialization and model-update paths

Testing

  • python3 -m pytest -o addopts= tests/agent/test_context_compressor.py -k threshold

Closes #14690

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder labels Apr 24, 2026
@LeonSGP43 LeonSGP43 force-pushed the fix/context-compression-threshold-14690 branch from 16cb76b to 3d92913 Compare April 26, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Context auto-compression never triggers when context_length == MINIMUM_CONTEXT_LENGTH (64000)

2 participants