Skip to content

feat(display): configurable background memory/skill notifications - #47226

Merged
teknium1 merged 3 commits into
mainfrom
salvage/4684-memory-notifications
Jun 16, 2026
Merged

feat(display): configurable background memory/skill notifications#47226
teknium1 merged 3 commits into
mainfrom
salvage/4684-memory-notifications

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

The background self-improvement review's 💾 Memory updated chatter is now configurable — off, on (default), or verbose — 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() takes notification_mode (off → silent, on → generic line, verbose → content preview); now also covers skill_manage actions.
  • tools/skill_manager_tool.py: emit _change previews (create/edit description, patch old→new) for verbose mode.
  • gateway/run.py + run_agent.py: wire display.memory_notifications (bool back-compat coerced to on/off) through to the summarizer.
  • hermes_cli/config.py: add display.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

Mode Output
off [] (review still runs/writes)
on (default) Memory updated / Skill 'x' patched
verbose Memory ➕ <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

gateway-display-controls

WolframRavenwolf and others added 3 commits June 16, 2026 05:32
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
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: salvage/4684-memory-notifications vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 10966 on HEAD, 10962 on base (🆕 +4)

🆕 New issues (4):

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.

@alt-glitch alt-glitch added type/feature New feature or request comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/gateway Gateway runner, session dispatch, delivery tool/memory Memory tool and memory providers P3 Low — cosmetic, nice to have labels Jun 16, 2026
@teknium1
teknium1 merged commit 98ae286 into main Jun 16, 2026
35 checks passed
@teknium1
teknium1 deleted the salvage/4684-memory-notifications branch June 16, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have tool/memory Memory tool and memory providers type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants