- Implement logic to distinguish between "full" memory errors and actual failures in the `_detect_tool_failure` function. - Add JSON parsing to identify specific error messages related to memory limits, improving error handling for memory-related tools.