[P0] Call clear_stale_conversations() in Sleep Phase #7
Labels
No labels
audit-2025-12-03
component/api
component/commands
component/llm
component/memory
component/tick-loop
component/tools
priority
high
priority
low
status
in-progress
status
needs-info
status
needs-triage
status
on-hold
type
bug
type
documentation
type
enhancement
type
feature
type
refactor
type
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
blightbow/evennia_ai#7
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?
Problem
clear_stale_conversations()exists but is never called. This leads to:conversation_historygrowthSuggested Fix
Add call to
run_dreaming_tick()after entity consolidation.Priority
P0 — Immediate (Blocks Production)
Source
Architecture Audit 2025-12-03, Section 2: Memory Leak Potential
Resolution
Added
clear_stale_conversations()call to the dreaming phase inrun_sleep_tick().Changes
rag_memory.py (lines 866-876):
clear_stale_conversations(character)after episodic pruningstale_conversations_clearedtest_working_memory.py:
TestClearStaleConversationsIntegrationtest classrun_sleep_tickDreaming Phase Cleanup Order
run_dreaming_tick()- A-MEM memory link generationrun_entity_consolidation_batch()- O-Mem entity consolidationcheck_reflection_trigger()/run_reflection()- Generative Agents insightsprune_low_importance_entries()- Episodic memory pruningclear_stale_conversations()- Working memory cleanup (NEW)This prevents unbounded growth of
active_conversationsin working memory.