feat(display): configurable background memory/skill notifications - #47226
Merged
Conversation
Background memory reviews now support three notification modes,
configured via display.memory_notifications in config.yaml:
off — no chat notification (still logged to stdout/HA log)
on — generic '💾 Memory updated' (default, unchanged behavior)
verbose — content preview with action indicators:
💾 Memory ➕ Hermes Repo liegt unter /config/amy/hermes-agent/...
💾 Memory ✏️ Updated repo path from claude-code to hermes-agent...
💾 Memory ➖ old entry about claude-code path...
Previews are truncated to 120 chars for adds/replaces, 60 for removes.
Each action gets its own line in verbose mode for readability.
Files: run_agent.py, gateway/run.py
When display.memory_notifications is set to 'verbose', skill_manage notifications now show meaningful change details instead of just the generic tool message. Before (verbose mode): 💾 📝 Patched SKILL.md in skill 'gogcli' (1 replacement). After (verbose mode): 💾 📝 Skill 'gogcli' patched: "old pitfall text..." → "new pitfall text..." Changes: - skill_manager_tool.py: _patch_skill() now includes old/new string previews (truncated to 200 chars) in the result via '_change' key. _create_skill() and _edit_skill() include skill description from frontmatter for verbose create/edit notifications. - run_agent.py: Background review notification builder now reads the '_change' dict from skill tool results and formats descriptive notifications per action type (patch → old→new diff, create/edit → description preview). Falls back to generic message when _change data is unavailable (backwards compatible). This is especially useful when subagents patch skills, since neither the user nor the parent agent can see what the subagent changed.
Follow-up to salvaged PR #4684: - Add display.memory_notifications to DEFAULT_CONFIG (off|on|verbose, default on) - Document the setting in docs/user-guide/features/memory.md - Add resolver tests for off/on/verbose memory + skill paths
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-assignment |
2 |
unresolved-attribute |
2 |
First entries
tools/skill_manager_tool.py:764: [invalid-assignment] invalid-assignment: Invalid subscript assignment with key of type `Literal["_change"]` and value of type `dict[str, str]` on object of type `dict[str, bool | str]`
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
gateway/run.py:14707: [invalid-assignment] invalid-assignment: Object of type `str` is not assignable to attribute `memory_notifications` on type `(Any & ~None) | AIAgent`
run_agent.py:2925: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
✅ Fixed issues (1):
| Rule | Count |
|---|---|
invalid-assignment |
1 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`
Unchanged: 5771 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
1 task
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 self-improvement review's
💾 Memory updatedchatter is now configurable —off,on(default), orverbose— instead of always-on with no detail. Salvages #4684 by @WolframRavenwolf onto current main, with config/docs/tests added.Changes
agent/background_review.py:summarize_background_review_actions()takesnotification_mode(off → silent, on → generic line, verbose → content preview); now also coversskill_manageactions.tools/skill_manager_tool.py: emit_changepreviews (create/edit description, patch old→new) for verbose mode.gateway/run.py+run_agent.py: wiredisplay.memory_notifications(bool back-compat coerced to on/off) through to the summarizer.hermes_cli/config.py: adddisplay.memory_notifications: "on"to DEFAULT_CONFIG.website/docs/user-guide/features/memory.md: document the setting + per-platform override.tests/run_agent/test_background_review.py: resolver tests for off/on/verbose (memory + skill).Validation
off[](review still runs/writes)on(default)Memory updated/Skill 'x' patchedverboseMemory ➕ <content>/ skill"old" → "new"Targeted suite:
tests/run_agent/test_background_review.py— 10 passed.Original PR #4684 by @WolframRavenwolf; his commits are preserved via rebase-merge.
Infographic