Skip to content

feat(prompt): add opt-in prompt compaction toggles - #32335

Closed
ht1072 wants to merge 3 commits into
NousResearch:mainfrom
ht1072:local-sync/20260525-231122/03-prompt-token-compaction-recut
Closed

feat(prompt): add opt-in prompt compaction toggles#32335
ht1072 wants to merge 3 commits into
NousResearch:mainfrom
ht1072:local-sync/20260525-231122/03-prompt-token-compaction-recut

Conversation

@ht1072

@ht1072 ht1072 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds opt-in prompt-token compaction toggles for stable guidance blocks, skills prompt rendering, context-file prose, and tool descriptions.
  • Keeps defaults unchanged; compaction only runs when the relevant display.* config flag is enabled.
  • Adds conservative compactor helpers with tests that preserve URLs, paths, inline code, flags, and structured/bulleted content.

Test plan

  • python -m pytest -o addopts='' tests/agent/test_context_prompt_compactor.py tests/agent/test_tool_description_compactor.py tests/agent/test_context_files_compaction.py tests/agent/test_guidance_blocks_compaction.py tests/agent/test_skills_prompt_compaction.py tests/agent/test_model_tools_compact_tool_descriptions.py -q

@alt-glitch alt-glitch added type/perf Performance improvement or optimization P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels May 26, 2026
@ht1072

ht1072 commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by re-cut PR #32349 from current main. This old branch carried stale whole-file copies and regressed unrelated upstream tests; closing to keep review surface clean.

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

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have type/perf Performance improvement or optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants