Description
Agno drops server_tool_use and *_tool_result blocks from message history.
When Claude uses code execution skills, the API response contains block types that
agno's format_messages() silently discards when building subsequent requests:
- server_tool_use (code execution tool call initiated by the server)
- bash_code_execution_tool_result
- text_editor_code_execution_tool_result
Without these blocks in the message history, Claude has no memory of having run code.
It therefore believes the file was never created and enters an infinite loop calling
get_generated_file, re-running code execution, and creating new file versions.
Steps to Reproduce
- Build an integration that lets you use files and contains with claude skills
- Ask claude to create a file
- have it call a tool after creating a file
- Claude after the tool call, will have no record that it created any file (bc we strip these events from history)
Agent Configuration (if applicable)
Just use claude and enable the correct code execution and maybe pdf skill
Expected Behavior
We need to include this missed events to ensure claude functions properly
Actual Behavior
We remove them
Screenshots or Logs (if applicable)
No response
Environment
Possible Solutions (optional)
No response
Additional Context
No response
Description
Agno drops server_tool_use and *_tool_result blocks from message history.
When Claude uses code execution skills, the API response contains block types that
agno's format_messages() silently discards when building subsequent requests:
- server_tool_use (code execution tool call initiated by the server)
- bash_code_execution_tool_result
- text_editor_code_execution_tool_result
Steps to Reproduce
Agent Configuration (if applicable)
Just use claude and enable the correct code execution and maybe pdf skill
Expected Behavior
We need to include this missed events to ensure claude functions properly
Actual Behavior
We remove them
Screenshots or Logs (if applicable)
No response
Environment
Possible Solutions (optional)
No response
Additional Context
No response