-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Feature: Configurable memory promotion target file #71330
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
Memory-core's short-term promotion system hardcodes
MEMORY.mdas the target file for promoted memories (source:dist/short-term-promotion-BMEmSJk4.js:1257). This causes several issues:Bootstrap truncation:
MEMORY.mdis subject to OpenClaw's 12KB per-file bootstrap limit. As promotions accumulate, the file grows past this limit and gets truncated — losing critical context that the agent needs at session start.Mixed concerns: Promotion metadata (scores, source references, recall counts) is algorithmically useful but clutters the human-curated bootstrap context. These are two different audiences (algorithm vs. agent) sharing one file.
Unbounded growth: Without manual intervention, promotions keep appending to
MEMORY.mdindefinitely. In our case, 29 promotion blocks consumed ~40% of the file (16KB of a 40KB file), pushing it well past the 12KB bootstrap limit.Current Workaround
We've disabled the promotion cron job (ID:
b38a1c62) and manually moved existing promotions to a separateMEMORY_PROMOTIONS.mdfile. This keepsMEMORY.mdlean (10.4KB, under the 12KB limit) while still allowingmemory_searchto find promoted content in the separate file.Proposed Solution
Add a configuration option to specify where promotions are written:
Key behaviors:
"MEMORY.md"(backward compatible, no change for existing users)YYYY-MM) for time-based organizationmemory_searchregardless of target fileUse Cases
memory/promotions-2026-04.md) keep each file small and organized chronologicallyMEMORY_PROMOTIONS.mdfor algorithmic metadata,MEMORY.mdfor curated agent contextRelated Issues
None of these address the core issue: the hardcoded promotion target file path.
Environment
Impact
This affects any OpenClaw deployment that uses Active Memory with promotions enabled for more than a few days. The current behavior degrades agent context quality as promotions accumulate, which is counterproductive — promotions are meant to improve recall, not degrade bootstrap context.