xonecas.io
60255
Zn

Zoea-Nova / commit 09e496c

fix: preserve tool loop history for autonomous myses

Bug: Nudge-driven myses lost all assistant/tool history between turns
Cause: turnBoundaryIdx==-1 path only added synthetic nudge
Fix: Include extractLatestToolLoop(allMemories) before nudge

Now autonomous myses maintain conversation continuity.

xonecas2026-02-07 09e496c7d62cd19488c1be118c5be39c22d3f6f3 parent 1a5c363

1 file changed

internal/core/mysis.go+8−1
@@ -1449,7 +1449,14 @@ func (m *Mysis) getContextMemories() ([]*store.Memory, error) {
14491449 currentTurnMemories := allMemories[turnBoundaryIdx:]
14501450 result = append(result, currentTurnMemories...)
14511451 } else {
1452- // No user prompt found - generate synthetic nudge
1452+ // No user prompt found (autonomous nudge-driven mysis)
1453+ // Include recent tool loop to maintain conversation continuity
1454+ historicalToolLoop := m.extractLatestToolLoop(allMemories)
1455+ if len(historicalToolLoop) > 0 {
1456+ result = append(result, historicalToolLoop...)
1457+ }
1458+
1459+ // Then add synthetic nudge
14531460 // Note: Nudge counter increment happens in caller (handleLLMResponse)
14541461 nudgeContent := "Continue your mission. Check notifications and coordinate with the swarm."
14551462 nudgeMemory := &store.Memory{