fix(self-improvement-loop): give bg review 16 iters and hide mid-review status leaks#19710
Merged
Conversation
…uppress status leaks
The background memory/skill review fork had two user-visible issues:
1. max_iterations=8 was too tight for multi-step reviews. A review that
needs to skill_view one or two candidate skills, add a memory entry,
and patch a skill routinely blew the budget — surfacing an 'Iteration
budget exhausted (8/8)' warning to the user and leaving the review
half-finished.
2. Mid-review lifecycle messages leaked into the user's terminal past the
existing quiet_mode + redirect_stdout/stderr guards. _emit_status and
_emit_warning route through _vprint(force=True) -> _print_fn /
status_callback, which bypass sys.stdout entirely. The stdout redirect
only catches raw print() calls.
Changes:
- Bump the review fork's max_iterations from 8 to 16.
- Set review_agent.suppress_status_output = True on the fork. This
short-circuits _vprint unconditionally so _emit_status/_emit_warning
emissions (iteration-budget warnings, rate-limit retries, compression
messages) never reach the user. The only user-visible output remains
the compact final summary line ('💾 Self-improvement review: ...')
which is printed via self._safe_print on the *main* agent (outside
the fork's redirect/suppress scope).
Summarizer filter is already correct — _summarize_background_review_actions
only surfaces tool calls with data.get('success') is truthy, so failed
attempts and reasoning text never reach the summary line.
nickdlkk
pushed a commit
to nickdlkk/hermes-agent
that referenced
this pull request
May 11, 2026
…uppress status leaks (NousResearch#19710) The background memory/skill review fork had two user-visible issues: 1. max_iterations=8 was too tight for multi-step reviews. A review that needs to skill_view one or two candidate skills, add a memory entry, and patch a skill routinely blew the budget — surfacing an 'Iteration budget exhausted (8/8)' warning to the user and leaving the review half-finished. 2. Mid-review lifecycle messages leaked into the user's terminal past the existing quiet_mode + redirect_stdout/stderr guards. _emit_status and _emit_warning route through _vprint(force=True) -> _print_fn / status_callback, which bypass sys.stdout entirely. The stdout redirect only catches raw print() calls. Changes: - Bump the review fork's max_iterations from 8 to 16. - Set review_agent.suppress_status_output = True on the fork. This short-circuits _vprint unconditionally so _emit_status/_emit_warning emissions (iteration-budget warnings, rate-limit retries, compression messages) never reach the user. The only user-visible output remains the compact final summary line ('💾 Self-improvement review: ...') which is printed via self._safe_print on the *main* agent (outside the fork's redirect/suppress scope). Summarizer filter is already correct — _summarize_background_review_actions only surfaces tool calls with data.get('success') is truthy, so failed attempts and reasoning text never reach the summary line.
rmulligan
pushed a commit
to rmulligan/hermes-agent
that referenced
this pull request
May 11, 2026
…uppress status leaks (NousResearch#19710) The background memory/skill review fork had two user-visible issues: 1. max_iterations=8 was too tight for multi-step reviews. A review that needs to skill_view one or two candidate skills, add a memory entry, and patch a skill routinely blew the budget — surfacing an 'Iteration budget exhausted (8/8)' warning to the user and leaving the review half-finished. 2. Mid-review lifecycle messages leaked into the user's terminal past the existing quiet_mode + redirect_stdout/stderr guards. _emit_status and _emit_warning route through _vprint(force=True) -> _print_fn / status_callback, which bypass sys.stdout entirely. The stdout redirect only catches raw print() calls. Changes: - Bump the review fork's max_iterations from 8 to 16. - Set review_agent.suppress_status_output = True on the fork. This short-circuits _vprint unconditionally so _emit_status/_emit_warning emissions (iteration-budget warnings, rate-limit retries, compression messages) never reach the user. The only user-visible output remains the compact final summary line ('💾 Self-improvement review: ...') which is printed via self._safe_print on the *main* agent (outside the fork's redirect/suppress scope). Summarizer filter is already correct — _summarize_background_review_actions only surfaces tool calls with data.get('success') is truthy, so failed attempts and reasoning text never reach the summary line.
jsboige
pushed a commit
to jsboige/hermes-agent
that referenced
this pull request
May 14, 2026
…uppress status leaks (NousResearch#19710) The background memory/skill review fork had two user-visible issues: 1. max_iterations=8 was too tight for multi-step reviews. A review that needs to skill_view one or two candidate skills, add a memory entry, and patch a skill routinely blew the budget — surfacing an 'Iteration budget exhausted (8/8)' warning to the user and leaving the review half-finished. 2. Mid-review lifecycle messages leaked into the user's terminal past the existing quiet_mode + redirect_stdout/stderr guards. _emit_status and _emit_warning route through _vprint(force=True) -> _print_fn / status_callback, which bypass sys.stdout entirely. The stdout redirect only catches raw print() calls. Changes: - Bump the review fork's max_iterations from 8 to 16. - Set review_agent.suppress_status_output = True on the fork. This short-circuits _vprint unconditionally so _emit_status/_emit_warning emissions (iteration-budget warnings, rate-limit retries, compression messages) never reach the user. The only user-visible output remains the compact final summary line ('💾 Self-improvement review: ...') which is printed via self._safe_print on the *main* agent (outside the fork's redirect/suppress scope). Summarizer filter is already correct — _summarize_background_review_actions only surfaces tool calls with data.get('success') is truthy, so failed attempts and reasoning text never reach the summary line.
dannyJ848
pushed a commit
to dannyJ848/hermes-agent
that referenced
this pull request
May 17, 2026
…uppress status leaks (NousResearch#19710) The background memory/skill review fork had two user-visible issues: 1. max_iterations=8 was too tight for multi-step reviews. A review that needs to skill_view one or two candidate skills, add a memory entry, and patch a skill routinely blew the budget — surfacing an 'Iteration budget exhausted (8/8)' warning to the user and leaving the review half-finished. 2. Mid-review lifecycle messages leaked into the user's terminal past the existing quiet_mode + redirect_stdout/stderr guards. _emit_status and _emit_warning route through _vprint(force=True) -> _print_fn / status_callback, which bypass sys.stdout entirely. The stdout redirect only catches raw print() calls. Changes: - Bump the review fork's max_iterations from 8 to 16. - Set review_agent.suppress_status_output = True on the fork. This short-circuits _vprint unconditionally so _emit_status/_emit_warning emissions (iteration-budget warnings, rate-limit retries, compression messages) never reach the user. The only user-visible output remains the compact final summary line ('💾 Self-improvement review: ...') which is printed via self._safe_print on the *main* agent (outside the fork's redirect/suppress scope). Summarizer filter is already correct — _summarize_background_review_actions only surfaces tool calls with data.get('success') is truthy, so failed attempts and reasoning text never reach the summary line.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…uppress status leaks (NousResearch#19710) The background memory/skill review fork had two user-visible issues: 1. max_iterations=8 was too tight for multi-step reviews. A review that needs to skill_view one or two candidate skills, add a memory entry, and patch a skill routinely blew the budget — surfacing an 'Iteration budget exhausted (8/8)' warning to the user and leaving the review half-finished. 2. Mid-review lifecycle messages leaked into the user's terminal past the existing quiet_mode + redirect_stdout/stderr guards. _emit_status and _emit_warning route through _vprint(force=True) -> _print_fn / status_callback, which bypass sys.stdout entirely. The stdout redirect only catches raw print() calls. Changes: - Bump the review fork's max_iterations from 8 to 16. - Set review_agent.suppress_status_output = True on the fork. This short-circuits _vprint unconditionally so _emit_status/_emit_warning emissions (iteration-budget warnings, rate-limit retries, compression messages) never reach the user. The only user-visible output remains the compact final summary line ('💾 Self-improvement review: ...') which is printed via self._safe_print on the *main* agent (outside the fork's redirect/suppress scope). Summarizer filter is already correct — _summarize_background_review_actions only surfaces tool calls with data.get('success') is truthy, so failed attempts and reasoning text never reach the summary line.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…uppress status leaks (NousResearch#19710) The background memory/skill review fork had two user-visible issues: 1. max_iterations=8 was too tight for multi-step reviews. A review that needs to skill_view one or two candidate skills, add a memory entry, and patch a skill routinely blew the budget — surfacing an 'Iteration budget exhausted (8/8)' warning to the user and leaving the review half-finished. 2. Mid-review lifecycle messages leaked into the user's terminal past the existing quiet_mode + redirect_stdout/stderr guards. _emit_status and _emit_warning route through _vprint(force=True) -> _print_fn / status_callback, which bypass sys.stdout entirely. The stdout redirect only catches raw print() calls. Changes: - Bump the review fork's max_iterations from 8 to 16. - Set review_agent.suppress_status_output = True on the fork. This short-circuits _vprint unconditionally so _emit_status/_emit_warning emissions (iteration-budget warnings, rate-limit retries, compression messages) never reach the user. The only user-visible output remains the compact final summary line ('💾 Self-improvement review: ...') which is printed via self._safe_print on the *main* agent (outside the fork's redirect/suppress scope). Summarizer filter is already correct — _summarize_background_review_actions only surfaces tool calls with data.get('success') is truthy, so failed attempts and reasoning text never reach the summary line.
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
The background memory/skill review fork no longer trips its own iteration-budget warning on multi-step reviews, and no longer leaks mid-review lifecycle messages into the user's terminal. Only the final
💾 Self-improvement review: ...summary reaches the user.Changes
run_agent.py_spawn_background_review: bump forkmax_iterations8 → 16run_agent.py_spawn_background_review: setreview_agent.suppress_status_output = Trueon the forkWhy
Two user-visible issues showed up during a long CLI session that triggered a combined memory+skill review:
skill_viewon a couple of candidate skills, adds a memory entry, and patches a skill. The review would hitIteration budget exhausted (8/8)and leave work half-done.quiet_mode=True+contextlib.redirect_stdout(devnull)+redirect_stderr(devnull). But_emit_status/_emit_warningroute through_vprint(force=True)→_print_fn/status_callback, which bypasssys.stdoutentirely. So mid-review⚠️ Iteration budget exhausted, rate-limit retries, compression warnings, etc. all bubbled up to the user.suppress_status_outputis the existing (already-wired) flag that short-circuits_vprintunconditionally — repurposing it here is the cleanest fix.The summary filter was already correct —
_summarize_background_review_actionsalready gates ondata.get('success')so failed attempts and reasoning text never reach the summary line. The leak was from the fork's own lifecycle emits, not the summarizer.Validation
Iteration budget exhausted💾 Self-improvement review: ...summarypy_compilepasses. Skill reference doc (references/self-improvement-loop.md) updated separately to reflect the new invariants.