conductor-oss/conductor · error · IllegalArgumentException
Skill package exceeds max size of {maxPackageBytes} bytes
Error message
Skill package exceeds max size of {maxPackageBytes} bytes What it means
Thrown by register() (via readPackage) when the uploaded package bytes exceed maxPackageBytes (default 52,428,800 = 50 MiB, configurable via agentspan.skills.max-package-bytes). This is the compressed upload size cap, checked immediately after reading the multipart bytes and before any zip parsing.
Source
Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/SkillRegistryService.java:415
.orElseThrow(() -> new IllegalArgumentException("Skill not found: " + name));
}
private Map<String, Object> parseManifest(String manifestJson) {
if (manifestJson == null || manifestJson.isBlank()) {
throw new IllegalArgumentException("Skill manifest is required");
}
try {
return MAPPER.readValue(manifestJson, MAP_TYPE);
} catch (IOException e) {
throw new IllegalArgumentException("Invalid skill manifest JSON: " + e.getMessage(), e);
}
}
private byte[] readPackage(MultipartFile packageFile) {
try {
byte[] bytes = packageFile.getBytes();
if (bytes.length > maxPackageBytes) {
throw new IllegalArgumentException(
"Skill package exceeds max size of " + maxPackageBytes + " bytes");
}
return bytes;
} catch (IOException e) {
throw new IllegalArgumentException(
"Failed to read skill package: " + e.getMessage(), e);
}
}
@SuppressWarnings("unchecked")
private ParsedSkillPackage parseSkillPackage(byte[] bytes, Map<String, Object> manifest) {
List<SkillFileEntry> files = new ArrayList<>();
Map<String, byte[]> contentByPath = new TreeMap<>();
long totalUncompressedBytes = 0;
try (ZipInputStream zip = new ZipInputStream(new ByteArrayInputStream(bytes))) {
ZipEntry entry;
while ((entry = zip.getNextEntry()) != null) {
if (entry.isDirectory()) {View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Reduce the package size: remove large binaries, vendor dirs, or unused assets.
- Raise agentspan.skills.max-package-bytes in application config if larger packages are legitimate.
- Host large reference data externally and reference it from the skill instead of bundling.
Example fix
# application.yml
agentspan:
skills:
max-package-bytes: 104857600 # 100 MiB Defensive patterns
Strategy: validation
Validate before calling
// Client-side: check package size before uploading
long size = Files.size(packageFile.toPath());
if (size > maxPackageBytes) { throw new IllegalArgumentException("package too large: " + size); } Type guard
static boolean withinPackageLimit(long size, long maxPackageBytes) { return size <= maxPackageBytes; } Try / catch
try { skillRegistryService.register(manifest, pkg); }
catch (IllegalArgumentException e) {
if (e.getMessage().contains("exceeds max size")) { /* shrink package or raise limit */ }
else throw e;
} Prevention
- Exclude large binaries and vendored deps from the zip in the build step.
- Document the configured max-package-bytes to skill authors.
When it happens
Trigger: POST /api/skills/register with a package zip larger than the configured limit. Fires for any upload over the cap regardless of uncompressed content size.
Common situations: Bundling large binaries, datasets, or vendored dependencies into the skill zip; the default 50 MiB limit being lower than a team's package; lowering the limit in a shared config and then uploading previously-valid packages.
Related errors
- Skill package exceeds max file count of {maxFileCount}
- Skill package contains oversized file: {path}
- Skill manifest name '{manifestName}' does not match package
- Skill {name} version {version} already exists with a differe
- File path is required
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/a8ed867926f06912.
Report an issue: GitHub.