Skip to content

silent_save config flag is never read by the Stop hook #854

@denysbutenko

Description

@denysbutenko

The silent_save flag under [hooks] is exposed through the mempalace_hook_settings MCP tool and stored via MempalaceConfig, but hooks_cli.py never reads it. Flipping it to true has no visible effect. The Stop hook still emits the blocking AUTO-SAVE checkpoint reason every 15 user messages, exactly as if the flag were false.

Where the disconnect is

mempalace/config.py defines the property correctly:

@property
def hook_silent_save(self):
    """Whether the stop hook saves directly (True) or blocks for MCP calls (False)."""
    return self._file_config.get("hooks", {}).get("silent_save", True)

mempalace/mcp_server.py reads and writes it through tool_hook_settings. That all works.

But mempalace/hooks_cli.py in hook_stop does this once the 15-message threshold trips:

if since_last >= SAVE_INTERVAL and exchange_count > 0:
    ...
    _output({"decision": "block", "reason": STOP_BLOCK_REASON})

No MempalaceConfig import, no check against hook_silent_save. It always blocks. I checked the develop branch on GitHub today and the same code path is there, so this is not fixed in unreleased work either.

Repro

  1. mempalace_hook_settings silent_save=true via MCP
  2. mempalace_hook_settings with no args confirms silent_save: true
  3. Run a Claude Code session past 15 user messages
  4. The Stop hook still injects the AUTO-SAVE checkpoint (MemPalace) blocking system-reminder

What I'd want

Honestly, the design question is the harder part. The current Stop hook works by injecting context that tells the model to call MCP save tools. A true "silent save" would need the hook itself to write a diary entry / drawer in-process, without round-tripping through the model. I don't know your intended shape for that.

If the intent of silent_save is "skip the auto-save reminder entirely and rely on manual saves only," the fix is one branch in hook_stop. If the intent is "actually save something automatically, just without the model in the loop," that's a real design task.

Either way, the current state where the flag reads back as enabled but does nothing is worth fixing, even if just by removing the dead config and the MCP tool.

Environment

  • mempalace 3.2.0 (PyPI)
  • Plugin cache: mempalace/3.0.14
  • Claude Code on macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/hooksClaude Code hook scripts (Stop, PreCompact, SessionStart)bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions