Skip to content

Add memory usage display toggle feature#26

Open
Dhravya wants to merge 1 commit intomainfrom
claude/memory-usage-display-akXYq
Open

Add memory usage display toggle feature#26
Dhravya wants to merge 1 commit intomainfrom
claude/memory-usage-display-akXYq

Conversation

@Dhravya
Copy link
Copy Markdown
Member

@Dhravya Dhravya commented Mar 14, 2026

Summary

This PR adds a new feature to toggle the display of memory usage counts in AI responses. Users can now control whether the model shows how many memories from Supermemory were used to inform each response.

Key Changes

  • Configuration: Added showMemoryUsage boolean field to SupermemoryConfig (defaults to true)
  • CLI Setup: Added interactive prompt during setup to configure memory usage display preference
  • Slash Command: Implemented /memory-usage command to toggle the feature on/off at runtime with support for explicit arguments (on/off/true/false/enable/disable)
  • Memory Context Formatting: Modified formatContext() to conditionally include memory usage instructions in the system prompt based on the configuration
  • Display Output: When enabled, the model is instructed to include a brief note at the start of responses showing how many memories were loaded and used (e.g., "[Supermemory: 5 memories loaded, 3 used]")
  • Configuration Persistence: Memory usage preference is saved to and loaded from the plugin configuration file

Implementation Details

  • The feature defaults to true (enabled) to provide users with visibility into memory usage by default
  • The /memory-usage command without arguments toggles the current state
  • The memory usage instruction is only added to the system prompt when the feature is enabled, avoiding unnecessary prompt modifications when disabled
  • The configuration is properly validated and included in the schema for configuration file parsing

https://claude.ai/code/session_01EZwRqj9GjD6K4pqMPRhe2P

…onse

- Add `showMemoryUsage` config option (default: true) to SupermemoryConfig
- Instruct the model to display "[Supermemory: N memories loaded]" at the
  start of each response so users know OpenClaw is using their long-term memory
- Add `/memory-usage` slash command to toggle the display on/off at runtime
- Include the new option in setup-advanced and status CLI commands

https://claude.ai/code/session_01EZwRqj9GjD6K4pqMPRhe2P
@Dhravya Dhravya marked this pull request as ready for review March 14, 2026 22:09
@Dhravya Dhravya requested a review from Prasanna721 March 14, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants