fix: avoid re-injecting todo subjects after compression - #18883
Open
batchprocess128 wants to merge 1 commit into
Open
fix: avoid re-injecting todo subjects after compression#18883batchprocess128 wants to merge 1 commit into
batchprocess128 wants to merge 1 commit into
Conversation
This was referenced May 16, 2026
Contributor
|
Thanks for the focused privacy hardening. The underlying behavior is still present on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
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
Fixes a todo privacy boundary in Hermes' post-compression state recovery.
Before this change,
TodoStore.format_for_injection()appended full pending and in-progress todo subjects back into the compressed conversation as a user message. Todo subjects are useful for local planning, but they can contain sensitive task details. Re-injecting them into fresh model context after compression can re-surface details that should stay local to the original tool result.This PR keeps todo continuity without re-surfacing full subjects after compression:
todowith no parameters when it needs full detailsTest plan
python -m pytest tests/tools/test_todo_tool.py tests/tools/test_read_loop_detection.py -q -o 'addopts='Result:
Risk / compatibility
This changes only the post-compression injection text. Normal todo reads/writes still return the full current list, and the live UI can still render todos from tool events.
The tradeoff is intentional: after compression, the model gets continuity counts and must explicitly call
todoto inspect full task details rather than receiving all active subjects automatically.