Skip to content

The agent that grows with you

fix(honcho): read the sessionStart pin defensively in the first-turn formatter

Erosikacc3bfc2120a4
diff --git a/plugins/memory/honcho/__init__.py b/plugins/memory/honcho/__init__.py
index 32e72195356..09ff47671a2 100644
--- a/plugins/memory/honcho/__init__.py
+++ b/plugins/memory/honcho/__init__.py
@@ -405,7 +405,8 @@ class HonchoMemoryProvider(DialecticMixin, MemoryProvider):
"""Render the prefetch context, keeping only the ``injection.sessionStart`` components when pinned.
The summary passes usable_honcho_summary here, so a contaminated one never reaches _base_context_cache."""
ctx = {**ctx, "summary": usable_honcho_summary(ctx.get("summary")) or ""}
- allowed = self._session_start_components
+ # getattr: tests build the provider without initialize().
+ allowed = getattr(self, "_session_start_components", None)
parts, suppressed = [], []
for name, key, header in _CONTEXT_SECTIONS:
value = ctx.get(key, "")