diff --git a/autogpt_platform/backend/backend/util/sandbox_files.py b/autogpt_platform/backend/backend/util/sandbox_files.py index d5782a23eb..42f13eeb9f 100644 --- a/autogpt_platform/backend/backend/util/sandbox_files.py +++ b/autogpt_platform/backend/backend/util/sandbox_files.py @@ -238,7 +238,10 @@ async def store_sandbox_files( if result.startswith("workspace://"): workspace_ref = result except Exception as e: - logger.debug(f"Failed to store file {file.name} to workspace: {e}") + logger.warning(f"Failed to store file {file.name} to workspace: {e}") + # For binary files, fall back to data URI to prevent data loss + if not file.is_text: + content_str = data_uri outputs.append( SandboxFileOutput(