{"record":{"id":"9a8d22f29afd085b","repo":"conductor-oss/conductor","slug":"skill-package-contains-oversized-file-path","errorCode":null,"errorMessage":"Skill package contains oversized file: {path}","messagePattern":"Skill package contains oversized file: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/SkillRegistryService.java","lineNumber":456,"sourceCode":"                            \"Skill package exceeds max file count of \" + maxFileCount);\n                }\n                String path = normalizeEntryName(entry.getName());\n                if (contentByPath.containsKey(path)) {\n                    throw new IllegalArgumentException(\n                            \"Skill package contains duplicate path: \" + path);\n                }\n                MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n                long size = 0;\n                ByteArrayOutputStream content = new ByteArrayOutputStream();\n                byte[] buffer = new byte[8192];\n                int read;\n                while ((read = zip.read(buffer)) >= 0) {\n                    digest.update(buffer, 0, read);\n                    content.write(buffer, 0, read);\n                    size += read;\n                    totalUncompressedBytes += read;\n                    if (size > maxPackageBytes) {\n                        throw new IllegalArgumentException(\n                                \"Skill package contains oversized file: \" + path);\n                    }\n                    if (totalUncompressedBytes > maxUncompressedBytes) {\n                        throw new IllegalArgumentException(\n                                \"Skill package exceeds max uncompressed size of \"\n                                        + maxUncompressedBytes\n                                        + \" bytes\");\n                    }\n                }\n                contentByPath.put(path, content.toByteArray());\n                files.add(\n                        SkillFileEntry.builder()\n                                .path(path)\n                                .size(size)\n                                .sha256(hex(digest.digest()))\n                                .contentType(contentType(path))\n                                .build());\n            }","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/SkillRegistryService.java#L438-L474","documentation":"Thrown by parseSkillPackage when a single file's uncompressed size exceeds maxPackageBytes (default 50 MiB) during streaming decompression. The size is accumulated per-entry as bytes are read, so it catches an entry whose decompressed content alone is too large, even if the compressed zip is small.","triggerScenarios":"POST /api/skills/register with a zip containing one highly-compressible but huge file (e.g. a 200 MiB log or a generated JSON) that decompresses past the per-file cap. Distinguished from [94] (total) by being per-file.","commonSituations":"A skill bundling a single large generated reference file; a compressed text/log file that is small compressed but large decompressed; vendoring a big dataset as one file.","solutions":["Remove or shrink the oversized single file from the package.","Split the large file into smaller chunks if it must be bundled.","Reference large data externally rather than embedding it in the skill zip."],"exampleFix":"// before: package includes a 120MB generated.json\n// after: remove it, reference via URL in SKILL.md\nzip skill.zip SKILL.md scripts/ references/small.json","handlingStrategy":"validation","validationCode":"// Before zipping, check each candidate file's uncompressed size\nfor (Path p : includedFiles) {\n    if (Files.size(p) > maxPackageBytes) throw new IllegalArgumentException(\"oversized file: \" + p);\n}","typeGuard":"static boolean noOversizedFile(long fileSize, long maxPackageBytes) { return fileSize <= maxPackageBytes; }","tryCatchPattern":"try { skillRegistryService.register(manifest, pkg); }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"oversized file\")) { /* remove or shrink the file */ }\n    else throw e;\n}","preventionTips":["Do not bundle single files larger than the per-file cap.","Reference large data externally instead of embedding."],"tags":["java","conductor","skill-registry","size-limit","zip","validation"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}