Problem
/exec can drop generated files from files[] with no marker in the response. The client can't tell "not generated" from "generated but dropped". artifact_delivery covers upload failures only (api/v2.ts, delivery.ts). These limits in api/src/job.ts skip files without it:
- Output file count:
SANDBOX_MAX_OUTPUT_FILES (default 50) stops the scan once it's reached. Inherited refs only fill the slots left over.
- Nesting depth: directories at
max_nesting_depth (default 10) or deeper are skipped.
- Path shape / length: paths failing
isValidPathShape (max_path_length 256) are skipped.
- File size: files over
SANDBOX_MAX_FILE_SIZE (default 10 MB) are skipped.
- Unreadable files: a failed
stat skips the file.
An internal truncated status exists, but it never reaches the response.
Impact
LibreChat's create_file and the other sandbox authoring writes report success unless artifact_delivery is set (LibreChat-AI/LibreChat#15920, LibreChat-AI/LibreChat#15671). A file dropped by one of these limits is reported as written, but it isn't persisted for later calls or downloads.
Proposal
When the scan skips a file that would otherwise be returned, say so in the response. Either extend artifact_delivery, or add a sibling marker such as { code: 'artifact_truncated', reasons: { max_files, depth, size, path, unreadable }, skipped }. Ideally include the skipped relative paths, capped, so a client can match its own write against them.
Out of scope, since these are intentional and not failures:
- unsupported extensions
- hidden directories
- unchanged files that session-mode content-hash dedup leaves out
Problem
/execcan drop generated files fromfiles[]with no marker in the response. The client can't tell "not generated" from "generated but dropped".artifact_deliverycovers upload failures only (api/v2.ts,delivery.ts). These limits inapi/src/job.tsskip files without it:SANDBOX_MAX_OUTPUT_FILES(default 50) stops the scan once it's reached. Inherited refs only fill the slots left over.max_nesting_depth(default 10) or deeper are skipped.isValidPathShape(max_path_length256) are skipped.SANDBOX_MAX_FILE_SIZE(default 10 MB) are skipped.statskips the file.An internal
truncatedstatus exists, but it never reaches the response.Impact
LibreChat's
create_fileand the other sandbox authoring writes report success unlessartifact_deliveryis set (LibreChat-AI/LibreChat#15920, LibreChat-AI/LibreChat#15671). A file dropped by one of these limits is reported as written, but it isn't persisted for later calls or downloads.Proposal
When the scan skips a file that would otherwise be returned, say so in the response. Either extend
artifact_delivery, or add a sibling marker such as{ code: 'artifact_truncated', reasons: { max_files, depth, size, path, unreadable }, skipped }. Ideally include the skipped relative paths, capped, so a client can match its own write against them.Out of scope, since these are intentional and not failures: