mirror of
https://github.com/dtzp555-max/memory-continuity.git
synced 2026-07-22 13:35:06 +00:00
Prevents memory/ from growing unbounded by capping STATE_ARCHIVE files at 20 per type and enforcing a 500-file hard limit on the entire memory directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
763 B
763 B
Current State
Last updated: 2026-03-21T02:00:58.027Z
Objective
但是文件数目不可以超过500条
Current Step
Conversation ended after 181 messages
Key Decisions
- Auto-extracted from conversation
Next Action
Continue from where we left off
Blockers
None
Unsurfaced Results
🦞 大内总管: 已加硬上限。
改动:
MAX_MEMORY_FILES = 500- 每次 archive 后检查
memory/总文件数 - 超过 500 → 自动删最旧的可删文件,降到 450(留 50 个余量)
- 不会删的:
CURRENT_STATE.md、MEMORY.md、INDEX.md、主题文件、JSON 状态文件
三层防护:
- 单类 archive 上限 20 个
- 总文件数硬上限 500
- 清理时按修改时间排序,从最旧的开始删