fix(context): preserve standalone engine compression arguments - #65915
Closed
newjordan wants to merge 2 commits into
Closed
fix(context): preserve standalone engine compression arguments#65915newjordan wants to merge 2 commits into
newjordan wants to merge 2 commits into
Conversation
newjordan
force-pushed
the
agent/context-engine-installation
branch
from
July 16, 2026 20:06
6465fee to
1c45c74
Compare
Collaborator
Author
|
Superseded by #65933. After triage, the runtime portion was removed to avoid duplicating #16450 and #64342; the replacement retains only the standalone context-engine documentation. The original head branch was deleted while closing this PR, and GitHub will not reopen a PR after that branch is recreated, so #65933 carries the recovered docs-only commit. |
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
/compress <focus>for engines that implement the documentedfocus_topicargument but not the built-in-onlyforceextensionTypeErrors instead of masking them with a second, reduced-argument callWhy
Hermes currently calls every engine with
focus_topicandforce, catches anyTypeError, and retries with onlycurrent_tokens. That keeps older strict-signature plugins alive, but it also drops manual focus for current third-party engines and can execute a broken compressor twice while hiding its original error.Signature-aware forwarding preserves backward compatibility without conflating an engine bug with an unsupported keyword. The documentation update makes the standalone route explicit for third-party engines, which aligns with the repository policy that external integrations should not be added under the core
plugins/tree.This was exercised while building a standalone local embedding context engine that uses the existing
ContextEngineandregister_context_engine()surfaces; no product-specific code is added to Hermes core.Validation
uv run --python 3.11 --with pytest python -m pytest -q tests/run_agent/test_compress_focus_plugin_fallback.py tests/run_agent/test_plugin_context_engine_init.py tests/agent/test_context_engine.py tests/agent/test_compress_focus.py tests/agent/test_compression_concurrent_fork.py— 64 passeduvx ruff check agent/conversation_compression.py tests/run_agent/test_compress_focus_plugin_fallback.py tests/agent/test_compression_concurrent_fork.py— passednpm run buildfromwebsite/— Docusaurus production build passed for English and Simplified Chinesegit diff --check— passed