agent.stream() call, it invokes the /api/agents/{:agent}/stream endpoint multiple times, and each time it only includes one latest message in messages. As a result, within a single agent.stream() session the agent behaves as if it has “amnesia”—for example, it may have just called a certain tool, but after two rounds of API requests, it calls the same tool again.