Replies: 5 comments
-
|
Thanks @cy2311 for the report. This issue is staying open for maintainer triage. CodeWhale gets better because people bring us real edge cases from real machines, providers, regions, and workflows. If you can add a reproduction, logs, version output, screenshots, or the provider/model involved, that makes it much easier for us to verify and harvest the fix. Maintainers may comment |
Beta Was this translation helpful? Give feedback.
-
|
First implementation slice submitted in PR #2933 — adds:
Initial implementation focuses on explicit agent-driven storage (agent calls |
Beta Was this translation helpful? Give feedback.
-
|
let me think thru this deeply - i've stayed away from a memory system yet because when I do it, I want to really think deeply about it. if you're able to open a PR as well and show me a bit of what you're imagining or even reference another open source project or how another tool performs, that can help me understand what you're thinking |
Beta Was this translation helpful? Give feedback.
-
|
I'd also reocmmend joining the wechat group or telegram group or posting on the discussion board :) |
Beta Was this translation helpful? Give feedback.
-
|
oh, thanx man, how can I join the wechat grop |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
CodeWhale currently has a 1M-token context window, but beyond that there is no real memory system. The current mechanisms are:
/compact: manual compression of early turns into a natural-language summarynotetool: agents can persist key-value factsCtrl+Rsession picker: manually switch between sessionsThese are not a memory system. They are a flat storage — no indexing, no cross-session retrieval, no consolidation, no active forgetting. The user starts a new session and the AI remembers nothing unless explicitly told.
A True Hippocampal Memory System for AI
Biological hippocampal memory does four things that current AI context management does not:
1. Binding / Indexing
When an AI performs related actions (edits
dispatch.rs, addsstarted_atto subagent error, opens PR #2933), these facts should be cross-indexed as a graph, not stored as independent text fragments:This enables pattern completion: given the fragment "tool error message issue", the system reconstructs the full graph —
format_tool_error→dispatch.rs→ PR #2933 → linked yolo.md and subagent changes.2. Pattern Completion
A true memory system doesn't do literal full-text search. It takes a partial cue and reconstructs the full context:
This is fundamentally different from keyword search or vector similarity. It requires a structured index that models relationships, not just proximity.
3. Consolidation (Offline Processing)
The hippocampus replays experiences during idle periods (sleep) and transfers important patterns to the cortex. For AI:
4. Active Forgetting
Not "ran out of space." The system actively judges what is worth keeping:
This judgment should be model-driven (the AI decides what matters), not rule-based.
Proposed Architecture
Open Questions for Discussion
Storage: Should the index use SQLite with structured relations, or is a graph database needed?
Model-driven decisions: How much context budget should be allocated for the AI to decide what to consolidate/forget?
Trigger: Should consolidation run on a timer, at context pressure thresholds, or explicitly via a tool call?
Pattern completion granularity: When a user references "the tool issue from earlier," how much context should the system retrieve and inject?
Forgetting policy: Who decides what is ephemeral — the AI, the user, a config threshold, or a combination?
Cross-session retrieval: When the user starts a new session, what (if anything) should be pre-loaded into the working memory?
Relationship to existing code: The
notetool, session persistence, and compaction infrastructure already exist. How should a hippocampal system build on or replace these?Desired Outcome
A design discussion. Not an implementation ticket. This should produce a documented architecture that the community can review, critique, and eventually implement in slices.
Beta Was this translation helpful? Give feedback.
All reactions