Hey @amanhij
Me again :D
I haven't use one project for ~4 days, and today returned to it, and found that it returns an empty context.
Once again I let the LLM do the investigation (since stats cli showed that there are 111 memories for that project, and I even forced some of them by hand in chat to remember/anchor) but it didn't return anything:
Bug: get_project_context returns empty despite 111 memories existing for the project
Summary
get_project_context(directory) always returns an empty array because all memories have decayed to heat: 0.0000. The heat decay/consolidation cycle appears to aggressively zero out heat without respecting access patterns or protection status. This makes get_project_context — the primary tool for session-start context loading — completely non-functional.
Environment
- Zikkaron version: v1.4.0
- Total memories: 342
- Memories for affected project: 111
- Protected memories: 8
Steps to Reproduce
- Seed a project with
seed_project or accumulate memories over multiple sessions
- Wait for consolidation cycles to run (in my case, over ~8 days of usage)
- Call
get_project_context("/path/to/project")
- Observe: returns
{ "memories": [] }
Expected Behavior
get_project_context should return relevant memories for the project directory. At minimum, seed memories, protected/anchored memories, and recently accessed memories should be returned.
Actual Behavior
Returns empty array. Every single memory in the database has heat: 0.0000:
HEAT
Min: 0.0000 | Avg: 0.0000 | Max: 0.0000
cold (<0.01) 342 ########################################
cool (0.01-0.1) 0
warm (0.1-0.5) 0
hot (0.5-0.9) 0
burning (0.9+) 0
Diagnosis
recall works fine when called with min_heat: 0 — it bypasses the heat filter and successfully retrieves memories via semantic search. This confirms the memories exist, have valid embeddings, and are retrievable.
get_project_context silently filters them out because it applies a minimum heat threshold that none of the memories meet.
- Protected memories (8 total) also have zero heat. According to the docs,
anchor creates memories with "max heat" and is_protected=True, and they should be "ALWAYS included in post-compaction restoration regardless of other scoring." Yet they have decayed to zero heat like everything else.
- Access count is near-zero for most memories (302 out of 342 never accessed), suggesting that recall/access operations are not boosting heat, or the boost is immediately overridden by the next decay cycle.
Root Causes (suspected)
- Heat decay is too aggressive — consolidation cycles decay heat to zero without a floor. Even active memories can't maintain heat between sessions.
- Protected memories are not exempt from decay —
is_protected=True should prevent heat from decaying below a meaningful threshold, but it doesn't.
get_project_context has no fallback — when all memories are cold, it returns nothing instead of falling back to semantic search or ignoring heat for protected/seed memories.
Suggested Fixes
- Protected memories should have a heat floor — if
is_protected=True, heat should never decay below a usable threshold (e.g., 0.5).
get_project_context should always include protected and seed memories regardless of heat score.
- Heat decay should have a minimum floor for any memory that has been accessed at least once, or apply a slower decay curve.
- Consider a "warm start" boost — when
get_project_context or recall is called, bump heat on returned memories so they remain findable in subsequent calls within the same session.
Workaround
Calling recall(query, min_heat=0) instead of get_project_context does return memories, but this defeats the purpose of having a dedicated project context tool and requires knowing to pass min_heat=0 explicitly.
Hey @amanhij
Me again :D
I haven't use one project for ~4 days, and today returned to it, and found that it returns an empty context.
Once again I let the LLM do the investigation (since stats cli showed that there are 111 memories for that project, and I even forced some of them by hand in chat to remember/anchor) but it didn't return anything:
Bug:
get_project_contextreturns empty despite 111 memories existing for the projectSummary
get_project_context(directory)always returns an empty array because all memories have decayed toheat: 0.0000. The heat decay/consolidation cycle appears to aggressively zero out heat without respecting access patterns or protection status. This makesget_project_context— the primary tool for session-start context loading — completely non-functional.Environment
Steps to Reproduce
seed_projector accumulate memories over multiple sessionsget_project_context("/path/to/project"){ "memories": [] }Expected Behavior
get_project_contextshould return relevant memories for the project directory. At minimum, seed memories, protected/anchored memories, and recently accessed memories should be returned.Actual Behavior
Returns empty array. Every single memory in the database has
heat: 0.0000:Diagnosis
recallworks fine when called withmin_heat: 0— it bypasses the heat filter and successfully retrieves memories via semantic search. This confirms the memories exist, have valid embeddings, and are retrievable.get_project_contextsilently filters them out because it applies a minimum heat threshold that none of the memories meet.anchorcreates memories with "max heat" andis_protected=True, and they should be "ALWAYS included in post-compaction restoration regardless of other scoring." Yet they have decayed to zero heat like everything else.Root Causes (suspected)
is_protected=Trueshould prevent heat from decaying below a meaningful threshold, but it doesn't.get_project_contexthas no fallback — when all memories are cold, it returns nothing instead of falling back to semantic search or ignoring heat for protected/seed memories.Suggested Fixes
is_protected=True, heat should never decay below a usable threshold (e.g., 0.5).get_project_contextshould always include protected and seed memories regardless of heat score.get_project_contextorrecallis called, bump heat on returned memories so they remain findable in subsequent calls within the same session.Workaround
Calling
recall(query, min_heat=0)instead ofget_project_contextdoes return memories, but this defeats the purpose of having a dedicated project context tool and requires knowing to passmin_heat=0explicitly.