Code Interpreter fails to upload multiple files - only first file is saved #11716
Unanswered
adamscross04
asked this question in
Troubleshooting
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
When attempting to upload multiple files simultaneously for Code Interpreter in an Agent, only the first file is successfully uploaded and saved to the Code Interpreter environment. The remaining files are silently dropped without any error message to the user.
Expected behavior: All selected files should be uploaded to the Code Interpreter environment (
/mnt/data/).Actual behavior: Only one file is uploaded. The UI provides no indication that files were dropped, leading users to believe all files were uploaded successfully.
Impact: This is a data loss issue - users lose files without clear error messages, potentially affecting their workflows and analysis.
Workaround
Using "Upload as Text" allows multiple files to be processed, but this is not suitable for:
Version Information
Steps to Reproduce
customer_email_2.txtandcustomer_email_3.txt)In this example:
customer_email_2.txtandcustomer_email_3.txtcustomer_email_3.txt(206 bytes) was actually present in/mnt/data/customer_email_2.txtwas completely lostWhat browsers are you seeing the problem on?
Relevant log output
Log locations:
./logs/debug-YYYY-MM-DD.log./api/logs/debug-YYYY-MM-DD.logTechnical Root Cause
After analyzing the codebase, the issue is in the file upload route configuration:
1. Route Configuration (api/server/routes/files/index.js:46)
Problem: Uses
upload.single('file')which only accepts one file at a time via multer middleware.2. Processing Logic (api/server/routes/files/files.js:370)
Problem: Only processes
req.file(singular), notreq.files(array).3. Code Interpreter Upload (api/server/services/Files/process.js:492-507)
Problem: Only processes one file from the request and uploads it to Code Interpreter service.
Proposed Solution
Change route to accept multiple files:
Update route handler to process
req.filesarray:Ensure proper error handling for partial failures
Maintain backwards compatibility for single file uploads
Additional Context
execute_codetool resource specificallyCode of Conduct
Beta Was this translation helpful? Give feedback.
All reactions