Required prerequisites
Motivation
ScreenshotToolkit.read_image() currently calls self.agent.step(...) inside the tool implementation.
When this tool is invoked by the same agent, it creates a re-entrant step() call during tool execution and can corrupt
the tool-call message sequence.
This leads to request failures like:
400 Bad Request: An assistant message with 'tool_calls' must be followed by tool messages responding to each
'tool_call_id'...
Solution
No response
Alternatives
No response
Additional context
No response
Required prerequisites
Motivation
ScreenshotToolkit.read_image() currently calls self.agent.step(...) inside the tool implementation.
When this tool is invoked by the same agent, it creates a re-entrant step() call during tool execution and can corrupt
the tool-call message sequence.
This leads to request failures like:
400 Bad Request: An assistant message with 'tool_calls' must be followed by tool messages responding to each
'tool_call_id'...
Solution
No response
Alternatives
No response
Additional context
No response