feat(MEMMY-411): add BYOK memory budgets and restore historical scans - #543
Merged
syzsunshine219 merged 7 commits intoSep 24, 2026
Merged
Conversation
Daily 10M and lifetime 500M apply only to memory_summary, memory_evolution, and document embeddings. L1 generation and retrieval stay unpaused. 0 means unlimited.
Update frontend design.
Keep memory-side usage on disk when App is down, pause budgeted work if persist fails, and wake queued jobs after storage recovers without inventing lost events.
Update frontend design.
Abort the in-flight App usage fetch on shutdown and drop late replies so a closed SQLite database is never read or written again.
fix the problem that initial and full scans skip agent history
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.
Description
Summary
This PR adds configurable token budgets for BYOK memory processing and
restores historical imports through initial and full scans.
Background memory processing previously had no configurable daily or lifetime
limit. Initial scans could skip historical turns, while historical backfill
could reject completed turns from before activation.
Fix:
Setting a limit to 0 disables that limit. Show usage, editable limits and
a pause notification linking to the budget settings.
queued work. Resume when the local day changes, limits are updated or
accounting recovers.
through a durable outbox, and reconcile usage with App totals. Abort
reconciliation and delivery on shutdown and ignore late responses.
Related CodeUp Issue: MEMMY-411
Type of change
How Has This Been Tested?
Validation used Node v22.23.2 and npm 10.9.8 on macOS arm64.
scope matching, repeated scans, HTTP response-loss retries and
memory-generation idempotency.
five existing edition-sensitive failures across four files.
App 1.1.8 / Memory 2.1.3.
The five full-suite failures are:
— two cases expect region cn; requests use intl.
— expects the default edition cn; receives intl.
— expects CN campaign copy; renders the intl variant.
— expects the memmy.cn documentation URL; receives memmy.bot.
These tests and the relevant edition-specific behavior already exist in
upstream/v1.1.9 and are unchanged by this PR.
Full-suite results:
Memory runs twice in the default npm test command; both runs passed.
The TUI suite was executed separately after the workspace failure:
5 passed.
Checklist
Reviewer Checklist