Skip to content

@Tool tool is called endlessly with chat memory enabled when using M8 #6211

@joshlong

Description

@joshlong

https://github.com/joshlong-attic/2026-05-29-infinite-tool-call-in-m8/blob/main/README.md

that is a reproducer

there's an oddity with infinite tool calling in Spring AI M8 + memory

you need ollama to make this run.

im using some big models but you might be able to get away with less.

them visit:

http://127.0.0.1:8080/josh/ask?question=fantastic.%20when%20can%20I%20pick%20up%20Prancer%20(dog%20ID%2045)%20from%20the%20Lisbon%20Pooch%20Palace%20location%3F&continue

it calls the tool over and over. if u change the DB to use PostgreSQL or somethign youc an see that its adding many blank rows in the chat memory table, too

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions