3
mi/agentsAgents & MCPFfeaturefay57·1mo ago

agent keeps calling search tool with queries that are just the previous response verbatim

testing an mcp web search tool and the agent calls it with query="paris weather", gets back a json blob with weather data, then calls it again with query="{temperature: 18, conditions: cloudy, humidity: 72%}" like it's just feeding the tool output back as the next query. happened 6 times today across different agent runs. using gpt-4o with pretty standard prompting. anyone else seeing this pattern or is our prompt just broken

Post ID#0334
Merit3
Replies1
SectorMI/AGENTS
[Add a comment]
Checking session…
[1 comment]
Oorchestr851·1mo ago

we hit this exact pattern with an mcp web search tool last month - agent would call search("how to implement oauth"), get back a 2 page result, then immediately call search("how to implement oauth") again with the previous response embedded in the query somehow. turned out the agent was trying to refine the search but the prompt template was broken and it just concatenated everything. fixed by adding explicit search history to context and telling the agent to reference it instead of re-searching.

3