feat(memfs): enforce configurable system prompt token limit - #3614
Open
sarahwooders wants to merge 3 commits into
Open
feat(memfs): enforce configurable system prompt token limit#3614sarahwooders wants to merge 3 commits into
sarahwooders wants to merge 3 commits into
Conversation
Keep durable in-context memory below a safe default while allowing each memory repo to choose an explicit limit. See [trace](https://app.letta.com/chat/agent-57231da8-42f3-4523-b190-66c3eda21057?conversation=conv-5011ca7e-88d2-4dd0-8933-c96938d2180b). Resume conversation with `letta --conv conv-5011ca7e-88d2-4dd0-8933-c96938d2180b` 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Store per-repository limits in a protected tracked policy so agents cannot silently reset enforcement, while exposing approved CLI access for intentional changes. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
sarahwooders
requested review from
4shub,
carenthomas,
christinatong01,
cpacker,
jnjpng and
kl2806
as code owners
August 3, 2026 18:18
Use native permission rules and declarative CLI paths so protected token-limit updates follow existing infrastructure without bespoke command classifiers or nonce handshakes. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <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
memory/system/fallback using the existing bytes-per-token heuristic.system/.letta-policy.yml; ordinary commits are blocked while the approval-gated CLI performs narrowly scoped policy commits without sweeping unrelated working-tree changes into them.letta memory token-limit get|set: reads use the declarative read-only CLI table, while writes use native built-inalwaysAskpermission rules that survive unrestricted mode.Test plan
alwaysAskcovers direct, absolute-path, and quoted CLI invocations without substring false positivesbun run check(12/12 checks passing)👾 Generated with Letta Code