Skip to content

Commit da1abc5

Browse files
author
octo-patch
committed
fix: pass MAX_MESSAGE_PAIRS_PER_AGENT to streaming conversation save (fixes #365)
The processStreamInBackground method was calling saveConversationExchange without the maxHistorySize parameter, causing conversation history to grow unbounded when using streaming responses regardless of MAX_MESSAGE_PAIRS_PER_AGENT config. This aligns the streaming code path with the non-streaming path.
1 parent c288510 commit da1abc5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

typescript/src/orchestrator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ export class AgentSquad {
536536
this.storage,
537537
userId,
538538
sessionId,
539-
agent.id
539+
agent.id,
540+
this.config.MAX_MESSAGE_PAIRS_PER_AGENT
540541
);
541542
}
542543
} else {

0 commit comments

Comments
 (0)