Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
3.5 KB
Raw Blame

Upgrade to v0.60.468.0: GBrain now needs Bun 1.4.4 or newer

On Bun 1.4.0 to 1.4.2 a postgres.js connection over TLS keeps every chunk it receives, so a full sync or conversion pass against a TLS Postgres or connection pooler grows by about the bytes it reads until a memory guard kills it. Bun 1.4.3 fixed that, and Bun 1.4.4 also carries the Brotli fix for CVE-2026-111497. This release makes Bun 1.4.4 the minimum. On Bun 1.4.0 to 1.4.3 every gbrain command, including serve, jobs work, hooks and autopilot, stops at startup with:

GBrain requires Bun 1.4.4 or newer (found Bun 1.4.x).
Fix: run `bun upgrade`, then restart GBrain. If a `gbrain upgrade` stopped here, finish it with `gbrain post-upgrade`.

gbrain --version still answers on an older Bun. Compiled release binaries carry their own Bun 1.4.4 and need nothing. Code that imports gbrain as a library runs on its host's Bun with no startup check, but its guarded outbound HTTP calls (URL checks, remote images, HTTP integrations) throw UNSUPPORTED_RUNTIME on a Bun below 1.4.4, so upgrade that host's Bun before upgrading gbrain. There is no schema change and no config change.

Upgrading Bun changes the user's runtime for every Bun program on the machine, so ask before running bun upgrade on their behalf.

  1. Check the runtime. Run bun --version on the brain host (and on any machine running a source-installed thin client). If it prints 1.4.4 or newer, or the user runs a compiled gbrain binary, skip to step 4.

  2. Upgrade Bun, with the user's agreement.

    bun upgrade
    bun --version   # 1.4.4 or newer
    

    A Bun installed by a package manager upgrades through it instead (brew upgrade oven-sh/bun/bun, npm install -g bun). If bun --version still shows the old version, an older bun comes first on PATH; find it with which -a bun.

  3. Finish the GBrain upgrade. If gbrain upgrade ran on the old Bun, its migrations stopped at the runtime check. Run:

    gbrain post-upgrade
    

    It is idempotent, so running it when nothing is pending is harmless.

  4. Restart long-running GBrain processes so they pick up the new runtime: a gbrain serve (stdio MCP: restart the agent harness; HTTP: restart the service), a gbrain jobs supervisor, and autopilot. Services managed by launchd, systemd or cron retry on their own and come back once Bun is upgraded; their refusal lines are in ~/.gbrain/autopilot.log and ~/.gbrain/autopilot.err. A cloud sandbox set up from an older gbrain bootstrap cloud-setup-script may keep a Bun 1.4.0 to 1.4.3 (that script accepted any Bun 1.4.0 or newer): paste the current script (gbrain bootstrap cloud-setup-script) into the environment's setup script again. An in-agent install (Grok Bot, Muse) upgrades with a freshly fetched helper: a bin/gbrain-setup written before v0.60.379.0 stages a Bun below 1.4.4 (1.4.3 or older), and setup then stops with runtime_below_floor without changing the install. Its message ends with the exact command to run: it fetches the current setup-in-agent.sh and reruns it with the install's --root, --harness and flags. Before an --upgrade, make the verified backup docs/guides/in-agent-setup.md describes.

  5. Verify.

    gbrain doctor
    

    bun_runtime reports Bun 1.4.x (minimum 1.4.4). If upgrade_errors still points at a post-upgrade failure from the old runtime, run gbrain apply-migrations --yes --no-autopilot-install once and re-run gbrain doctor.