feat: active context-denoising for failed-attempt tool results (Closes #1580) - #1748
Open
Lexus2016 wants to merge 7 commits into
Open
feat: active context-denoising for failed-attempt tool results (Closes #1580)#1748Lexus2016 wants to merge 7 commits into
Lexus2016 wants to merge 7 commits into
Conversation
Adds failed_attempt_marker.py — detects error-bearing tool results (tracebacks, non-zero exits, explicit error JSON, loop-guard messages) and returns their indices. Wired into ContextCompressor._prune_old_tool_results as Pass 1b: failed-attempt spans are demoted to 1-line summaries BEFORE the general pruning pass, reducing contextual drag from failed branches. Addresses the owner's rework brief (PR #1737 was closed as dead code): Slice A (marker) + Slice B (wiring) ship together in one PR with a real non-test call site (ContextCompressor._prune_old_tool_results line ~2770). Closes #1580 Co-Authored-By: Hermes Evolution <evolution@hermes.ai>
Contributor
૮ >ﻌ< ა ci reviewran on d0a9d1b all good! |
This was referenced Aug 6, 2026
This was referenced Aug 6, 2026
Lexus2016
added a commit
that referenced
this pull request
Aug 7, 2026
…1769) Digest filenames are date-encoded (YYYY-MM-DD) so lexicographic sort gives correct chronological order without relying on st_mtime, which becomes ambiguous when files are touched/copied after creation. This flaky test blocked PR #1748 CI (slice 8/8) despite the test failure being pre-existing and unrelated to the PR's changes. Closes #1767 Co-authored-by: Hermes Evolution <evolution@hermes.ai>
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.
Automated evolution PR for issue #1580 — context-denoising to defeat contextual drag from failed attempts.
New module agent/failed_attempt_marker.py detects error-bearing tool results (tracebacks, non-zero exits, explicit error JSON, loop-guard messages). Wired into ContextCompressor._prune_old_tool_results as Pass 1b: failed-attempt spans are demoted to 1-line summaries before the general pruning pass.
Addresses owner rework brief: PR #1737 was closed as dead code (zero call sites). This PR ships Slice A (marker) + Slice B (wiring) together with a real non-test call site at line ~2770.