feat: add /health command for MemFS system memory token audit#1060
Open
feat: add /health command for MemFS system memory token audit#1060
Conversation
👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com>
Estimates token usage of system/ files (4 bytes/token heuristic from Codex) and injects a <system-reminder> warning if usage exceeds 25% of the context window. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com>
…call 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com>
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.
Summary
/healthcommand that scanssystem/memory files and estimates their token footprint<system-reminder>warning into the agent if system memory exceeds 25% of the context window, prompting it to trimTest plan
/healthwith memfs enabled — should show per-file token table and total with color-coded percentage/healthwith memfs disabled — should show a message to enable memfs firstsystem/directory (>25% of context window), verify the system reminder is injected and the agent responds to trimsystem/dir — should show "No system/ memory files found"👾 Generated with Letta Code