fix(compressor): rename 'Pending User Asks' / 'Remaining Work' to historical framing (#38364)#38368
Closed
ferminquant wants to merge 2 commits into
Closed
Conversation
…torical framing
'## Pending User Asks' → '## Outstanding Context'
'## Remaining Work' → '## Prior Activity'
These section headers in the compaction summary body used actionable
language that, when combined with a vague but topically consistent user
instruction, caused the model to treat them as active task definitions
rather than background reference. The SUMMARY_PREFIX meta-instruction
('latest message WINS') was correct for contradictions and topic changes,
but the body sections' framing overrode it for the consistent-but-vague
case.
All section descriptions and instructions in the LLM template are
preserved; only the headers changed to unambiguously historical framing.
The SUMMARY_PREFIX text is also updated to reference the new section
names.
Fixes NousResearch#38364.
tonydwb
approved these changes
Jun 3, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Pure string rename in the context compressor template. The change is exactly what the description says, with no behavioral regressions:
- "Pending User Asks" → "Outstanding Context"
- "Remaining Work" → "Prior Activity"
All references in the preamble, template, docstring, and inline comment are updated consistently.
✅ Looks Good
- Single file changed, scope is surgical
- Template references updated atomically (preamble, inline comments, docstring)
- No logic changes, no risk of regression
Reviewed by Hermes Agent
…tionable-compaction-sections
Contributor
|
Closing as superseded by PR #44454 (merged), which lands the historical-heading rename across all three template sites plus removal of the "consistent → use as background" carveout — the carveout was the load-bearing part for the scope-expansion you reported in #38364, so renaming alone wouldn't have closed it. Thanks for the report and the PR; both are credited in the merged fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Renames two compaction summary section headers from actionable framing to purely historical framing:
## Pending User Asks→## Outstanding Context## Remaining Work→## Prior ActivityThe
SUMMARY_PREFIXis also updated to reference the new names. All section descriptions and LLM-prompt instructions are preserved — only the headers change.Root Cause
The compaction summary body (generated by the LLM summarizer) used section headers with actionable language: "## Pending User Asks" and "## Remaining Work." While the
SUMMARY_PREFIXmeta-instruction correctly says "latest message WINS" for contradictions and topic changes, its carveout for consistency ("if consistent, use as background") creates a trap: when the user's latest message is vague but topically consistent, the model reads the actionable-sounding headers as the real task definition and silently expands scope beyond what the skill's filters allow.Format beats framing: the structured task-like headers "## Remaining Work" and "## Pending User Asks" in the body carry more weight than the meta-instruction in the prefix telling the model they are background.
Fix
Ten replacements in
agent/context_compressor.py:"Remaining Work" replaces "Next Steps""Prior Activity" replaces "Next Steps"'## Pending User Asks' / '## Remaining Work''## Outstanding Context' / '## Prior Activity'## Pending User Asks## Outstanding Context## Remaining Work## Prior ActivityQuestions, Files, Remaining WorkQuestions, Files, Prior Activity## Pending User Asks## Outstanding Context## Remaining Work## Prior Activity"Pending User Asks""Outstanding Context"Verification
scripts/run_tests.sh tests/agent/test_context_compressor.py— 91 passedscripts/run_tests.sh tests/agent/test_summary_prefix_semantics.py— 5 passedscripts/run_tests.sh tests/agent/test_context_compressor_summary_continuity.py— 3 passedscripts/run_tests.sh tests/agent/test_compressor_historical_media.py tests/agent/test_compressor_image_tokens.py— passedscripts/run_tests.sh tests/agent/test_resume_stale_active_task.py— passedpython3 -c "import ast; ast.parse(open('agent/context_compressor.py').read()); print('Syntax OK')"— OKgrepconfirms all 10 occurrences of old names are replaced with new namesScope Boundaries
Test Plan
Security & Privacy Impact
Checklist
Code
fix(scope):).agent/context_compressor.py).scripts/run_tests.shon all compressor-related test files, Python syntax check.Documentation & Housekeeping
cli-config.yaml.exampleupdate: N/A — no config keys changed.CONTRIBUTING.md/AGENTS.mdupdate: N/A — no workflow or architecture changed.For New Skills
Screenshots / Logs
Closes #38364.