fix(config): warn when memory.provider is set alongside memory_enabled=false - #32816
Closed
briandevans wants to merge 1 commit into
Closed
briandevans wants to merge 1 commit into
briandevans wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds config validation and tests to warn when an external memory.provider is configured while in-prompt memory flags are disabled, since plugin loading is gated by memory.provider rather than memory_enabled / user_profile_enabled.
Changes:
- Add
validate_config_structurewarning whenmemory.provideris non-empty butmemory_enabledand/oruser_profile_enabledarefalse. - Add a focused test suite covering warning/no-warning cases for various
memoryconfigurations.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/hermes_cli/test_config_validation.py | Adds tests asserting the new warning behavior and its remediation hint. |
| hermes_cli/config.py | Implements the new memory provider “trap” warning in config structure validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+3637
to
+3645
| issues.append(ConfigIssue( | ||
| "warning", | ||
| f"memory.provider='{provider_name.strip()}' is set but " | ||
| f"{'/'.join(disabled_flags)}=false — the plugin still " | ||
| "loads (watchdog, recall, capture, persona writes) but " | ||
| "the LLM is not told it has memory tools", | ||
| "To fully disable the memory plugin, set " | ||
| "memory.provider: \"\" (empty string)", | ||
| )) |
Comment on lines
+3639
to
+3642
| f"memory.provider='{provider_name.strip()}' is set but " | ||
| f"{'/'.join(disabled_flags)}=false — the plugin still " | ||
| "loads (watchdog, recall, capture, persona writes) but " | ||
| "the LLM is not told it has memory tools", |
Comment on lines
+3627
to
+3629
| provider_name = memory_cfg.get("provider") | ||
| if isinstance(provider_name, str) and provider_name.strip(): | ||
| mem_enabled = memory_cfg.get("memory_enabled", True) |
briandevans
force-pushed
the
fix/config-warn-memory-provider-with-disabled-flag-32624
branch
3 times, most recently
from
May 30, 2026 21:13
49fcda5 to
3eddae5
Compare
…d=false `memory.provider` controls whether an external memory plugin is loaded (watchdog, recall, capture, persona writes). `memory_enabled` and `user_profile_enabled` control only whether the LLM is told it has a memory tool in the system prompt — they do NOT gate the plugin loader (see `plugins/memory/__init__.py:316-318`). Users (and assistant agents asked to "disable memory") routinely read `memory_enabled: false` as "turn the whole subsystem off" and observe the plugin watchdog and persona writes continuing anyway. The reporter spent ~14h debugging exactly this scenario before locating the gating logic (see NousResearch#32624 Trap 1, Option B). Add an additive `validate_config_structure()` warning that fires when `memory.provider` is non-empty AND (`memory_enabled` is false OR `user_profile_enabled` is false). Pure warning, no behavior change. The fix is intentionally scoped to Trap 1 of NousResearch#32624 — Traps 2 and 3 (sticky-profile config redirection, per-profile log path visibility) are cleanly separable per the issue reporter's note and belong in follow-up PRs.
briandevans
force-pushed
the
fix/config-warn-memory-provider-with-disabled-flag-32624
branch
from
May 31, 2026 21:19
3eddae5 to
ea4520a
Compare
Open
12 tasks
Contributor
Author
|
Closing to focus the queue on security/file-safety work where civilian merges are landing. Happy to reopen if maintainers want this picked up. |
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.
What does this PR do?
memory.providercontrols whether an external memory plugin is loaded (watchdog, recall, capture, persona writes).memory_enabled/user_profile_enabledcontrol only whether the LLM is told about the built-in memory tool in the system prompt. They do not gate the plugin loader —plugins/memory/__init__.py:316-318only readsmemory.provider.Users (and assistant agents asked to "disable memory") read
memory_enabled: falseas "turn the whole subsystem off" and observe the plugin watchdog, recall traffic, and persona writes continuing anyway. The reporter spent ~14h debugging exactly this in #32624 Trap 1 before locating the actual gating logic.This PR implements Option B from the issue: an additive
validate_config_structure()warning that fires whenmemory.provideris non-empty AND (memory_enabledisfalseORuser_profile_enabledisfalse). Pure warning, no behavior change.Related Issue
Fixes #32624 (Trap 1 only — Traps 2 and 3 are cleanly separable per the reporter's note and belong in follow-up PRs).
Type of Change
Changes Made
How to Test
```yaml
memory:
provider: memory_tencentdb
memory_enabled: false
```
```
⚠ memory.provider='memory_tencentdb' is set but memory_enabled=false — the plugin still loads (watchdog, recall, capture, persona writes) but the LLM is not told it has memory tools
```
Checklist
Code
Documentation & Housekeeping
Related / Positioning
Distinct from Burgunthy's open #30814 `fix(memory): prevent dead writes when memory_enabled is false`, which addresses runtime tool-dispatch for the in-process `MemoryStore` (Option C from the issue — behavior change at `tool_executor`). This PR is a purely additive config-load-time warning targeting the external plugin loader path the reporter actually hit (memory_tencentdb watchdog continuing for 14h despite `memory_enabled: false`). The two are complementary — both can land.