Repository navigation
Description
bash scripts/sync-skills.sh (and therefore bigpowers setup, which calls it) renders every skill by spawning a separate bash process per skill × adapter, with each adapter spawning additional jq processes. That is ~1,539 bash launches plus ~4,600 jq launches from a single long-lived Python process. On a constrained Windows session this exhausts process-creation resources partway through, the run dies with STATUS_DLL_INIT_FAILED, and then it hangs instead of failing.
Repro
Windows, Git Bash, a session with a low process cap (ulimit -u = 256 here, hard, unraisable):
bash scripts/sync-skills.sh --distribute-only
python-env: Using python3
sync-skills: WARN — yq unavailable or targets.yaml missing; using legacy render list (cursor gemini pi)
Error: adapter cursor failed with exit code 0xC0000142
…and the command never returns. Orphaned bash.exe / /usr/bin/bash processes are left behind (they inherit the stdio pipes, so the calling shell blocks on EOF rather than exiting).
0xC0000142 is STATUS_DLL_INIT_FAILED — the process could not be created/initialised, i.e. Windows-side process/session resource exhaustion, not an adapter or skill problem.
Root cause
scripts/lib/srp-engine.py --all loops skills (81) outer and adapters (19) inner and calls dispatch_to_adapter for each pair:
proc = subprocess.Popen([resolve_bash(), adapter_path], stdin=PIPE, stdout=PIPE, stderr=PIPE)That is 81 × 19 = 1,539 bash processes. Every stdin-driven adapter then parses the IR with three jq calls (IR_NAME, IR_DESCRIPTION, IR_BODY), plus echo/sed subshells — roughly 10,000+ process creations in total, all from one Python process.
Evidence it is volume, not the code
- The same engine, driven one skill per process (
for f in skills/*/SKILL.md; do python3 scripts/lib/srp-engine.py "$f"; done), completes 81/81 skills, 0 failures. Each of those 81 parents spawns only 19 children — the same per-parent fan-out that succeeds. - A single
--allrun (one parent, 1,539 children) fails. - No adapter spawns background children (
nohup/disown/setsid/&— none), anddispatch_to_adapterwaits and closes its pipes, so this is OS process pressure from the sheer count, not an adapter leak.
Impact
bin/setup.js always runs bash scripts/sync-skills.sh --distribute-only, so this affects every end-user install. Most machines complete it, but constrained Windows sessions (low process cap, AV interference, MSYS fork pressure) fail and hang. It is also simply wasteful: rendering is ~25s of real work spread across ~10k process spawns.
Proposed fix
Render all skills through one bash per adapter instead of one bash per skill×adapter:
srp-engine.py --allparses every skill once and writes a single NUL-delimited IR stream (name, description, model, body, pi body).- A small driver sources one adapter and calls its
render_skill()in a loop, so the exact same rendering code runs in-process and the per-adapterjqcalls disappear. - Adapters without a stdin entrypoint (
continue,omp,zed) remain no-ops, matching today's behaviour. - On any
render_skillfailure the driver exits non-zero and the engine aborts — no hang.
Result: ~1,539 bash + ~4,600 jq → 19 bash + 0 jq, with byte-identical generated artifacts.
Activity
perf(sync): render all skills in one bash process per adapter
github-actions commentedon Oct 25, 2026
🎉 This issue has been resolved in version 2.88.11 🎉
The release is available on:
Your semantic-release bot 📦🚀
perf(sync): render all skills in one bash process per adapter (daniel…