Skip to content

feat: active context-denoising for failed-attempt tool results (Closes #1580) - #1748

Open
Lexus2016 wants to merge 7 commits into
mainfrom
evolution/issue-1580-denoising
Open

feat: active context-denoising for failed-attempt tool results (Closes #1580)#1748
Lexus2016 wants to merge 7 commits into
mainfrom
evolution/issue-1580-denoising

Conversation

@Lexus2016

Copy link
Copy Markdown
Owner

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.

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>
@Lexus2016 Lexus2016 closed this Aug 6, 2026
@Lexus2016 Lexus2016 reopened this Aug 6, 2026
@github-actions github-actions Bot added the bug Something isn't working label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on d0a9d1b

all good!

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant