mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #2020] [Issue]: Long-Term Memory: remove the Advanced Memory recap import, so chats that use Advanced Memory are extracted from their own summaries and messages #1878
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1878
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/2020
Originally assigned to: @Promansis on GitHub.
Summary
"Use Advanced Memory recaps" (1.5.20, #1964) imports a chat's Advanced Memory scene recaps instead of its summaries and messages. It reads the recap's memory block with no AI call. The memories it makes are much thinner than normal extraction:
keywords: [], so keyword recall never finds them.extracted_fromlink back to its recap. Nothing gets a cause or follow-on link.The bigger problem is that the setting replaces normal extraction. Once a chat has scene records, its rolling summaries and Chat Messages pieces are skipped. So that chat never gets the full extractor.
Fixing each gap would rebuild the extractor inside a host recap format tied to an Engine capability API. Removing the feature is simpler. Chats that use Advanced Memory then go through the same import and extraction as every other chat.
Affected package
long-term-memory
Expected behavior
config.jsonthat hasuseAdvancedMemory: truestill loads.Actual behavior
server-entry.tsreturnsADVANCED_MEMORY_BLOCK_INSTRUCTIONfromsummaryMemoryInstruction, and the Engine (Capability API 1.391) appends it to every recap request.useAdvancedMemoryon,sources/interop.tscandidatesimports scene records and skips the chat's rolling summaries (except Game Mode sessions and conversation summaries) and its Chat Messages pieces.extraction/source-processing.tsadvancedMemoryUnitsturns the block into units withkeywords: []and no links exceptextracted_fromon timeline events.Steps to reproduce
Environment
Logs, screenshots, or video
One chat, 5 scene recaps imported by auto-import: 5 drafts, 32 units, 0 keywords, 0 links between memories, 0 threads. The debug log shows that auto-import run made no extraction request: the chat's messages were never read.
Additional context
History: #1964 (1.5.20) added the import, the block instruction and the backfill. Engine #8592 added the
summaryMemoryInstructionhook (Capability API 1.391). The Engine calls the hook optionally (services/generation/long-term-memory-runtime.ts,runtimeService()?.summaryMemoryInstruction?.()), so removing it needs no Engine change. Whether the Engine keeps or drops its unused hook is a separate Engine decision.Minimal fix
Scope: Long-Term Memory only, one patch release (1.5.29). This is mostly deletion. No Engine change, and no
engine.minchange.All paths are under
packages/long-term-memory/src/engine/packages/.Remove (server):
server/.../long-term-memory/server-entry.ts:ADVANCED_MEMORY_BLOCK_INSTRUCTIONand thesummaryMemoryInstructionentry.server/.../extraction/source-processing.ts:ADVANCED_MEMORY_BUCKETS,advancedMemoryBlockFields,advancedMemoryUnits, and theadvanced_memorybranch of the direct-ingest path (advancedMemoryflag, the "Directly ingested Advanced Memory scene recap." summary). Keep the Game Mode direct ingest.server/.../sources/interop.ts:AdvancedMemoryRecord,advancedMemoryRecords,advancedMemoryHosts,advancedMemoryAvailable,advancedMemoryScopeandadvancedMemoryEnabled.advancedMemoryandadvancedMemoryBlocksOnly, and the candidate fieldsceneMessageIds.candidates, remove the scene-record loop, the "scene records take over" skip of rolling summaries, and the "imports those instead of its messages" skip.advancedMemoryflags in the preview (including the secondcandidateswalk that runs only because of it), in the import selection and in the import function.advanced_memorybranches ofrowDestination,followsRecord,deterministicanduseExtractionAgent. Keep the Game Mode cases.advancedMemoryBackfillBatch.server/.../sources/auto-import-job.ts: drop bothadvancedMemoryBlocksOnlyspreads and their comment. Keep thechatspass, because it also imports rolling summaries.server/.../recall/generation-injection.ts: removeadvancedMemoryEchoesand its call.identity/chat-scope.ts: removeadvancedMemoryEchoNoteIds.recall/retrieval.ts: remove the excluded-notes option if nothing else passes it, otherwise just its comment.server/.../package-runtime.ts: remove thelistChatSummarieshost type (only the removed code calls it).routes/settings.ts: removeadvancedMemoryAvailable.routes/imports.ts: remove the/import/advanced-memory/backfill-batchroute.Remove (shared and client):
7.
shared/.../schema/sources.ts: bothadvancedMemoryBlocksOnlyfields and the backfill request and response schemas.8.
shared/.../schema/settings.tsandserver/.../extraction/extraction-config.ts: dropuseAdvancedMemoryfrom the resolved (.strict()) settings and from the defaults. KeepuseAdvancedMemory: z.boolean().optional()in the stored-settings input with a one-line comment that it is ignored, and make sure it is not passed into the resolved object. An existingconfig.jsonthat has it must still load.9.
client/.../settings/MemorySettings.tsx: the toggle and its form state.client/.../api.ts:advancedMemoryAvailable.client/.../sources/SourcesWorkspace.tsx: the "Older scene recaps" group and everything behind it (ADVANCED_MEMORY_BACKFILL_BATCH, its state and refs, the pending query,backfillAdvancedMemory, both places it is rendered).10.
client/.../locales/en.jsonandko.json: thememorysettings.useAdvancedMemory*andsourcesworkspace.advancedMemoryBackfill*keys.Keep (memories that were already imported): the
advanced_memoryprovenance kind inshared/.../schema/primitives.ts, the Vault origin chip and the draft source label inclient/.../vault/MemoryVault.tsx, the chat lookup in Re-extract (routes/notes.ts), and theadvanced_memorycase inextraction/structured-summary-normalizer.ts.Tests:
tests/long-term-memory-advanced-memory-import.regression.ts, and removeadvanced-memory-importfrom.github/workflows/ltm-browser.ymlandtests/README.md(both places).tests/long-term-memory-routes.regression.ts: the backfill route in the route list, and the availability case.tests/long-term-memory-browser.regression.ts: the toggle case, and the backfill and stuck-backfill cases.tests/long-term-memory-storage.regression.ts: theadvancedMemoryAvailablefield.tests/long-term-memory-feedback-clarity-ui.regression.mjs: the backfill batch-size assertions. Keep the Vault origin assertions.useAdvancedMemory: trueloads, and the resolved config has nouseAdvancedMemorykey.Changelog (1.5.29): Long-Term Memory no longer imports Advanced Memory scene recaps. Chats that use Advanced Memory are extracted from their own summaries and messages, so their memories get keywords, links and threads, and "Hide remembered messages" works for them. Memories already imported from recaps stay.
Non-goals:
summaryMemoryInstructionhook.