Skip to content

Add memory usage display toggle feature#26

Merged
Dhravya merged 3 commits into
mainfrom
claude/memory-usage-display-akXYq
May 11, 2026
Merged

Add memory usage display toggle feature#26
Dhravya merged 3 commits into
mainfrom
claude/memory-usage-display-akXYq

Conversation

@Dhravya

@Dhravya Dhravya commented Mar 14, 2026

Copy link
Copy Markdown
Member

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
@Dhravya Dhravya closed this Apr 30, 2026
@Dhravya Dhravya reopened this Apr 30, 2026
@Dhravya Dhravya requested a review from MaheshtheDev April 30, 2026 03:36
@ishaanxgupta

Copy link
Copy Markdown
Contributor

Changed openclaw.plugin.json (line 50) to include showMemoryUsage in:

  • uiHints, so OpenClaw UI/config surfaces know about it
  • configSchema.properties, so additionalProperties: false won’t reject configs written by CLI setup

Unrecognized arguments toggle the setting (line 57). /memory-usage status or a typo like /memory-usage ture silently flips the value. Unknown args now return Usage: /memory-usage [on|off] instead of silently toggling

@Dhravya Dhravya merged commit 4781175 into main May 11, 2026
3 checks passed
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.

3 participants