Skip to content

Prevent duplicate prompt history when Memory Advisor nests in a tool-calling or other loop - #41

Open
tzolov wants to merge 1 commit into
mainfrom
prevent-duplicate-prompty-history
Open

Prevent duplicate prompt history when Memory Advisor nests in a tool-calling or other loop#41
tzolov wants to merge 1 commit into
mainfrom
prevent-duplicate-prompty-history

Conversation

@tzolov

@tzolov tzolov commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Ported the isMemoryAlreadyInPrompt guard from spring-ai's MessageChatMemoryAdvisor (GH-6211): before() now skips re-prepending session history that's already a contiguous run in the prompt, which happens once ToolCallingAdvisor's loop re-enters the chain per round.
Also fixes the reference doc

…calling or other loop

Ported the isMemoryAlreadyInPrompt guard from spring-ai's
MessageChatMemoryAdvisor (GH-6211): before() now skips re-prepending
session history that's already a contiguous run in the prompt, which
happens once ToolCallingAdvisor's loop re-enters the chain per round.
Also fixes the reference doc

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
@tzolov tzolov added this to the 0.8.0 milestone Aug 3, 2026
@tzolov tzolov added the enhancement New feature or request label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant