Fix tool return message detection - use tool_return attribute
The first pass was incorrectly checking for a 'name' attribute to identify
tool return messages, but Letta's tool return messages don't have this attribute
(or it's None). Instead, tool return messages are identified by having:
- tool_return attribute (the actual return value)
- tool_call_id (to match with the call)
- status (success/error)
This fix:
- Changes first pass to detect tool returns using has_tool_return instead of has_name
- Stores ALL tool return statuses by tool_call_id (not just specific tools)
- Simplifies ignore_notification handling to check the tool_return string directly
- Moves deprecated tool check to tool_call messages where it belongs
This resolves the "unknown status" warnings that occurred because tool returns
weren't being properly collected.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>