abhigyanpatwari/GitNexus · error · SandboxError
Compound Engineering plugin exceeds the total byte limit
Error message
Compound Engineering plugin exceeds the total byte limit
What it means
Cumulative size guard in _build_ce_plugin_snapshot. The running total of payload bytes across all admitted files must stay within MAX_CE_PLUGIN_TOTAL_BYTES (16 MiB). Once a file pushes total_bytes past the cap, the snapshot is rejected. Per-file bytes (error 541/543) already bound each entry; this bounds the whole plugin.
Source
Thrown at eval/workflow_bench/runtime_mounts.py:434
def _build_ce_plugin_snapshot(config: CePluginConfig, destination_parent: Path) -> CePluginSnapshot:
parent = _validated_runtime_root(destination_parent, label="CE plugin snapshot parent")
root = Path(tempfile.mkdtemp(prefix="wfbench-ce-plugin-", dir=parent))
root.chmod(0o700)
entries: list[dict[str, Any]] = []
total_bytes = 0
try:
for relative, source in _plugin_files(config.source):
relative_text = relative.as_posix()
if len(relative_text.encode()) > MAX_CE_PLUGIN_PATH_BYTES:
raise SandboxError(f"Compound Engineering plugin path exceeds the byte limit: {relative_text}")
if len(entries) >= MAX_CE_PLUGIN_FILES:
raise SandboxError("Compound Engineering plugin exceeds the file-count limit")
payload, executable = _bounded_plugin_bytes(source)
total_bytes += len(payload)
if total_bytes > MAX_CE_PLUGIN_TOTAL_BYTES:
raise SandboxError("Compound Engineering plugin exceeds the total byte limit")
_write_snapshot_file(
root / Path(*relative.parts),
payload,
executable=executable,
)
entries.append(
{
"path": relative_text,
"sha256": hashlib.sha256(payload).hexdigest(),
"size": len(payload),
"executable": executable,
}
)
manifest_path = root / ".claude-plugin" / "plugin.json"
try:
plugin_manifest = json.loads(manifest_path.read_text())
except (OSError, UnicodeError, json.JSONDecodeError) as exc:View on GitHub (pinned to d540b00184)
Solutions
- Measure: 'du -sh <plugin_dir>' and 'du -ah <plugin_dir> | sort -rh | head' to find the biggest contributors, then trim.
- Move bulky reference data out of the plugin and fetch it by content hash at runtime.
- Drop unused assets (extra languages, unused skills' resources, doc PDFs).
- If the plugin genuinely needs more, split into separately versioned releases and mount only what each arm run needs.
Example fix
# before assets/embeddings/*.bin # 22 MiB across 12 files # after assets/embeddings/manifest.json # hashes + URLs; fetched on demand
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
MAX_TOTAL = 16 * 1024 * 1024
plugin = Path("ce-plugin")
total = sum(p.stat().st_size for p in plugin.rglob("*") if p.is_file())
if total > MAX_TOTAL:
raise SystemExit(f"plugin total {total} bytes exceeds {MAX_TOTAL}") Type guard
MAX_CE_PLUGIN_TOTAL_BYTES = 16 * 1024 * 1024
def total_within_bound(total_bytes: int) -> bool:
return total_bytes <= MAX_CE_PLUGIN_TOTAL_BYTES Try / catch
try:
snapshot = _build_ce_plugin_snapshot(config, destination_parent)
except SandboxError as exc:
if "total byte limit" in str(exc):
log.error("plugin > 16 MiB; move bulk data out")
raise Prevention
- Keep total plugin size well under 16 MiB.
- Move bulky reference data out; fetch by hash at runtime.
- CI gate: 'du -sh <plugin_dir>' must be under 16 MiB.
When it happens
Trigger: The sum of all plugin file sizes exceeds 16 MiB. Typical producers: many medium assets (icons, fonts, embeddings), a large bundled dataset split into <2 MiB chunks that together exceed 16 MiB, or a vendored model/grammar pack.
Common situations: Embedding a reference corpus, shipping multiple binary helpers under 2 MiB each, bundling grammar files for many languages, including docsets.
Related errors
- Compound Engineering plugin file exceeds the per-file limit:
- {label} exceeds the bounded evidence limit
- transcript artifact exceeds the bounded run-output limit
- Compound Engineering plugin file must be regular and non-sym
- Compound Engineering plugin path exceeds the byte limit: {re
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/f94e76fa4a1fc0e6.
Report an issue: GitHub.