fix(honcho): use sanitize regexes, collapse session key hyphens, gate cadence after tool call

This commit is contained in:
Erosika
2026-04-14 18:18:00 -04:00
parent 3387394a25
commit af5bbda7d2
3 changed files with 9 additions and 4 deletions
+5 -2
View File
@@ -55,8 +55,11 @@ _INTERNAL_NOTE_RE = re.compile(
def sanitize_context(text: str) -> str:
"""Strip fence-escape sequences from provider output."""
return _FENCE_TAG_RE.sub('', text)
"""Strip fence tags, injected context blocks, and system notes from provider output."""
text = _INTERNAL_CONTEXT_RE.sub('', text)
text = _INTERNAL_NOTE_RE.sub('', text)
text = _FENCE_TAG_RE.sub('', text)
return text
def build_memory_context_block(raw_context: str) -> str: