Skip to content

Remove the hard-coded 10 MiB skill-tree limit for skills with supporting assets #6240

Closed

Description

@artwist-polyakov

The workflow

Use a skill that includes supporting assets: images, fonts, document templates, example files, scripts, or reference material. These files are used from disk as needed; their combined size is not the amount of text sent to the model.

A legitimate skill can exceed 10 MiB without containing any disposable cache. It should be possible to use such a skill without removing useful assets or patching the installed application.

What happens today

Observed with bb 0.47.1, desktop app, macOS 27.0.1, using a local Personal workspace.

One user-level skill contained 17,233,250 bytes across 498 files. Attempts to start several threads, and to submit a turn in an existing thread, failed during preparation with:

Skill tree exceeds max byte count 10485760

The host-daemon log also reported:

Failed to pull required injected skill tree

Removing generated cache files, Python bytecode, and API logs reduced the skill to 9,289,868 bytes, after which thread startup worked again. This restored this installation, but it does not solve the case where the files exceeding the limit are useful assets.

What you would expect

Please remove the hard-coded 10 MiB per-skill ceiling. A skill's size on disk alone should not make it unusable.

If resource or transport constraints require a byte budget, please make that policy explicitly configurable by the owner, with a documented reason for the default and a supported way to raise it. Raising the constant to another fixed value would only move the same problem to larger skills.

Also, one oversized globally installed skill should not make unrelated threads impossible to start. If a skill cannot be loaded, the error should identify it, report its actual size and the configured limit, and provide an actionable way forward.

Minimal fixture for maintainers

The following end-to-end fixture is proposed from the validator check below; it was not installed into the now-working global skill directory during this investigation.

  1. With a standard desktop data directory, create a fresh two-file skill:
python3 - <<'PY'
from pathlib import Path

root = Path.home() / ".bb" / "skills" / "oversized-assets-repro"
root.mkdir(parents=True, exist_ok=False)
(root / "assets").mkdir()
(root / "SKILL.md").write_text(
    "---\nname: oversized-assets-repro\n"
    "description: Test a skill containing a large supporting asset\n"
    "---\n\nUse assets/example.bin as supporting material.\n",
    encoding="utf-8",
)
(root / "assets" / "example.bin").write_bytes(b"\0" * (11 * 1024 * 1024))
PY
  1. Start a new Personal thread and send Reply only with OK.
  2. Compare with the same fixture using a 9 MiB asset. Remove the temporary fixture after testing.

Evidence

Investigation report from local diagnosis:

The exact hard-coded limit is in apps/host-daemon/src/injected-skills.ts:28:

const MAX_STAGED_SKILL_BYTES = 10 * 1024 * 1024;

That is 10,485,760 bytes (10 MiB) per skill tree.

The received-tree check at lines 738–741 throws the exact error observed:

if (totalBytes > MAX_STAGED_SKILL_BYTES) {
  throw new Error(
    `Skill tree exceeds max byte count ${MAX_STAGED_SKILL_BYTES}`,
  );
}

There is also a local traversal check at lines 301–305 using the same constant. These line numbers and both checks were independently verified against the TypeScript source embedded in the installed 0.47.1 source map, as well as the pinned repository source above.

  • The server collects the files recursively. The byte budget includes supporting assets, not just SKILL.md.
  • An isolated check executed the unchanged validatedTreeEntries function extracted from the installed 0.47.1 bundle. Both inputs contained just two files: a 147-byte SKILL.md and assets/example.bin. There were no symlinks, caches, dependency directories, or excessive file counts/depth:
9 MiB asset:  total 9,437,331 bytes  -> accepted (2 files)
11 MiB asset: total 11,534,483 bytes -> Skill tree exceeds max byte count 10485760

This synthetic check exercised the packaged tree validator, not a new live thread. The live thread failures and recovery described above were observed with the original skill. The source on main was inspected, not run.

Context and alternatives

  • Related: #5436 proposed raising the limit to 32 MiB and preventing one oversized skill from breaking every thread. It was closed without merging in favor of fitting the particular Anatomy-based skill within the existing limits. This request asks for a general solution for legitimate large assets, rather than fitting one skill under another fixed ceiling.

  • I did not find a supported setting to raise this limit or an ignore-file mechanism in the installed staging code.

  • Cache cleanup is a temporary workaround for generated data; it cannot make a legitimate asset-heavy skill fit.

  • I cannot establish whether an update introduced the limit or changed when it is enforced.

  • Searched open and closed issues and related pull requests.

  • Observed the failure and recovery on installed 0.47.1; independently checked the asset-only case at the packaged validator.

AGENT GENERATED

Activity

  1. added theissue type on Oct 24, 2026
  2. added
    host
    threads
    confirmed-repro
    on Oct 24, 2026
  3. bb-slop-cop commented on Oct 24, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: High · Effort: Medium. Labels: host, threads, confirmed-repro.
    • Report: REPRODUCED — high root-cause confidence.
    • Evidence: In two clean checkouts of trusted main (9eb0c0925), a 2 MiB asset stages successfully, while a 12 MiB asset aborts staging even alongside a healthy skill. The existing staging suite passes: 25 passed, 2 skipped. This tests the production host-staging boundary, not a live desktop turn.
    • Root cause: The fixed decoded-tree byte budget includes supporting assets; required-tree failures are rethrown, aborting the whole catalog before runtime preparation. The exception reports the limit but not the skill or actual bytes.
    • No PR: Changing the resource safeguard or allowing required skills to be omitted needs a product/resource-policy decision and falls outside the simple-fix gate.
  4. added a commit that references this issue on Oct 26, 2026
    dbb5945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reprohostthreads

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions