Skip to content

Shelly v5.2.0 — Latest Claude Code with Bash tool

Choose a tag to compare

@RYOITABASHI RYOITABASHI released this 06 May 22:29
· 1322 commits to main since this release
5a21ce1

Shelly v5.2.0 — Latest Claude Code working with Bash tool

Major release. The Claude / Codex / Gemini harness was reworked end to
end so that the latest Claude Code (2.1.131 at release time) runs as
the default tier
with the Bash tool fully functional. Voice native
input and the image processor native helper are intentionally disabled
to dodge an upstream Bun-on-Android segfault; everything else (file
edits, Bash tool, Skills, MCP, multi-pane orchestration) works.

Why this release exists

A series of fixes between v5.1.1 (build 782) and v5.2.0 (build 808)
took down four overlapping problems that had been masked by stale CI
build cache:

  1. The bionic LD_PRELOAD wrapper started SIGSEGV-ing inside execve
    the moment a fresh CI cache produced a non-cached build.
  2. Anthropic's Claude Code SEA at 2.1.x crashed on Android arm64 musl
    while loading two specific embedded .node add-ons
    (audio-capture.node and image-processor.node).
  3. Anthropic moved cli.js out of the npm @anthropic-ai/claude-code
    tarball at 2.1.113 — the legacy npm tier could no longer reach
    anything past 2.1.112 by construction.
  4. The wrapper's static __thread rewrite buffer pulled in Clang's
    emulated-TLS helper, which itself had unresolved PLT references —
    so any /bin/grep pipeline crashed in the wrapper.

Highlights

  • Latest Claude Code 2.1.131 runs as the default tier via the
    Shelly-managed musl Bun SEA. SHELLY_PREFER_NATIVE_CLAUDE=1 is no
    longer required — the runtime updater promotes the latest verified
    release and the wrapper handles the trampoline.
  • Bash tool works end to end in the latest Claude Code.
  • Raw-syscall LD_PRELOAD wrappers. exec-wrapper.c and
    exec-wrapper-musl.c no longer depend on libdl, liblog, malloc, or
    TLS — every interception path uses svc #0 syscalls directly. The
    bug class "wrapper crashes during fresh CI rebuild" is gone.
  • Bun SEA .node byte patch. Two known-bad embedded native
    modules (audio-capture.node, image-processor.node) are
    short-circuited at the SEA level so the Bun loader never reaches
    the segfaulting dlopen(). Patch is applied both at runtime
    promotion time and at CI build time; both the bundled
    libclaude.so and the runtime-promoted SEA include it.
  • Legacy npm tier pinned to 2.1.112 (override via
    SHELLY_LEGACY_NPM_PIN). 2.1.113+ is structurally unreachable from
    a Node-only path; pinning makes the floor explicit so a clean
    install still has a working legacy tier.
  • Bun.hash polyfill with full named-variant coverage (wyhash /
    cityHash32/64 / xxHash3/32/64 / murmur32v2/v3 / murmur64v1/v2 /
    rapidhash / adler32 / crc32). SHA-256-backed, honours the seed
    argument so Bun.hash(K, Bun.hash(q)) keeps its seed-distinct
    invariant. Lets older cli.js paths past 2.1.112 launch under the
    Shelly-bundled bionic Node.
  • Sidebar Quick Launch section between TASKS and REPOSITORIES.
    Three chips (Claude / Codex / Gemini) open a fresh Terminal pane
    and run the matching CLI in one tap. Apple Superset-style top-of-
    sidebar shortcut row.
  • Runtime-failure feedback. When the native tier exits with a
    crash signal (134 / 139 / ...), the bash function appends a
    claude=<version> <epoch> <rc> <tier> record to
    ~/.shelly-runtime/.runtime-failures. The next
    __shelly_bg_cli_update consumes the file and adds those versions
    to recordFailedVersion's cooldown so the updater walks past them
    on the next promote.
  • ALWAYS_REFRESH extended. libexec_wrapper.so and the bundled
    claude SEA are now force-extracted on every app launch so wrapper
    fixes and SEA byte patches reach existing devices without a
    versionCode bump.
  • BUN_TMPDIR pinned to $HOME/.bun-tmp plus single-shot retry
    on native-tier crash signals (clear the tmp directory and try once
    more) so Bun's lazy .node extraction can't trip on a stale
    hash-prefixed leftover.

Verified device state

Device: Galaxy Z Fold6 (Android 16)

Shelly build: 807 (commit 07a4c4b)

~$ cat ~/.bashrc_version
76

~$ SHELLY_VERBOSE_CLI_TIER=1 claude --version
[shelly] claude: runtime latest (musl Bun SEA)
2.1.131 (Claude Code)

~$ claude
 ▐▛███▜▌   Claude Code v2.1.131
▝▜█████▛▘  Opus 4.7 (1M context) · Claude Max
❯ echo hello を bash tool で実行して
● Bash(echo hello)
  ⎿  hello
✻ Worked for 12s

Known limitations

  • Voice native input (audio-capture.node) and image processor
    native
    paths are disabled. JS fallbacks cover the user-facing
    "feature missing" case. Re-enabled automatically when Bun upstream
    fixes the Android arm64 musl .node segfault.
  • ~/.shelly-cli legacy install still uses --omit=optional,
    which means versions past 2.1.112 won't populate cli.js from
    Anthropic's restructured npm package. The pin defaults make this a
    no-op for users today; revisit when a future Anthropic release
    decouples the wrapper from the platform binary.
  • ALWAYS_REFRESH += "claude" copies ~220 MB out of the APK on
    every app launch. Future work: switch to a sha / build-marker diff
    refresh.

Detailed companion spec

docs/superpowers/specs/2026-05-06-build-808-claude-harness-rework.md
— per-commit breakdown of the four root causes and their fixes, with
verbatim crash signatures and the exact code that landed.