Repository navigation
v0.60.27.0
GBrain now needs Bun 1.4 or newer, because a bug in older Bun releases could make GBrain wait forever on a helper process that had already finished.
GBrain starts small helper processes all the time: git for your brain repo, background workers, syncs. Older Bun releases had a bug where one of those helpers could exit and Bun would never pass the news along, so whatever was waiting for it waited forever. On a laptop that looks like a command that never returns. On an always-on brain it looks like a worker that quietly stops making progress. Bun 1.4 includes the fix, so 1.4.0 is now the minimum.
Compiled release binaries already carry Bun 1.4.2, so if you run the gbrain binary there is nothing to do. If you installed from source with Bun, run bun upgrade first.
On an older Bun, every command (including serve, jobs work, hooks and autopilot) stops at startup with one message that names your Bun, the minimum and the fix, instead of starting and hanging later:
GBrain requires Bun 1.4.0 or newer (found Bun 1.3.14).
Fix: run `bun upgrade`, then restart GBrain. If a `gbrain upgrade` stopped here, finish it with `gbrain post-upgrade`.
| You run GBrain on | What happens after this release |
|---|---|
The compiled gbrain binary |
Nothing changes |
| Bun 1.4.0 or newer | Nothing changes; gbrain doctor shows a new bun_runtime row |
| Bun 1.3.x | Commands refuse with the message above until you run bun upgrade |
Things to watch
- If you run
gbrain upgradewhile still on Bun 1.3, the new version installs but its migrations stop at the runtime check, and the install prints the same message. Runbun upgrade, thengbrain post-upgrade. - Services under launchd, systemd or cron keep retrying and recover by themselves once Bun is upgraded. The refusal is in
~/.gbrain/autopilot.log. gbrain --versionstill answers on an older Bun, so tools that check the version keep working.
To take advantage of v0.60.27.0
-
Upgrade Bun (source installs only; compiled binaries skip this):
bun upgrade bun --version # 1.4.0 or newer -
Upgrade GBrain, or finish an upgrade that stopped at the runtime check:
gbrain upgrade # or, if you already upgraded on the old Bun: gbrain post-upgradeThen restart anything long-running:
gbrain serve(restart your agent harness for stdio MCP),gbrain jobs supervisor, autopilot. -
Your agent reads
skills/migrations/v0.60.27.0.mdthe next time you interact with it. It checks the runtime, asks before runningbun upgradefor you, and finishes the upgrade. -
Verify the outcome:
gbrain doctor # bun_runtime: "Bun 1.4.x (minimum 1.4.0)" -
If any step fails, please file an issue:
https://github.com/garrytan/gbrain/issues with:- output of
gbrain doctor - output of
bun --versionandwhich -a bun - contents of
~/.gbrain/upgrade-errors.jsonlif it exists
This feedback loop is how the gbrain maintainers find fragile upgrade paths. Thank you.
- output of
Say to your agent: "Is my Bun new enough for GBrain?" or "Finish upgrading GBrain after the Bun upgrade."
Itemized changes
Runtime floor
MINIMUM_BUN_VERSIONinsrc/core/runtime-version.tsandengines.buninpackage.jsonare now 1.4.0, the lowest 1.4 release. It carries the Linux child-exit fix (oven-sh/bun#30301, first shipped in 1.3.14), andtest/bounded-child-exec.test.tspasses on it.unsupportedBunMessage()builds the one refusal text: found version, minimum,bun upgrade, restart, andgbrain post-upgradefor an interrupted upgrade.assertSupportedBun()throws it with codeUNSUPPORTED_RUNTIME.- The CLI entrypoint (
src/cli.ts) checks before any command runs, so every subcommand fails fast with exit 1.gbrain --versionprints the version and exits 0, with the refusal on stderr, so an upgrade started by an older gbrain can still confirm what it installed.gbrain autopilotalso writes the refusal to stdout, because its services log stdout toautopilot.logand stderr to anautopilot.errnothing points at. scripts/postinstall.tsprints the refusal when an install orbun updatelands on an older Bun, and still exits 0.- New doctor check
bun_runtime(ops):Bun <version> (minimum 1.4.0), or a failure with the fix command. gbrain bootstrap cloud-setup-scriptinstalls Bun through npm when the sandbox has no Bun or one older than 1.4.0, and its launcher runs that Bun.- Install docs (README,
INSTALL_FOR_AGENTS.md,BOOTSTRAP_FOR_AGENTS.md,CONTRIBUTING.md,SECURITY.md,docs/guides/authorization-upgrade.md) state Bun 1.4.0 or newer and namebun upgrade.
What Bun 1.4 does not fix
- Bun still drops a child's pipe events when a callback re-enters the event loop (for example bun:test
expect().resolves); a raw repro withoutexecFileBoundedstill hangs on 1.4.2. The in-code bounds ongitchildren stay, and their comments now say which part Bun fixed.
For contributors
- The minimum-version CI lanes move to 1.4.0:
test.ymlsecurity regressions and all fourpersistence-validation.ymlmatrices run 1.4.0 and 1.4.2 (pull requests still skip the minimum).native-locks.ymldrops 1.3.11 and 1.3.13 and runs 1.4.0 and 1.4.2 on full scope (16 native pairs, 4 musl, 4 per Windows probe). test/scripts/ci-pr-scope.test.tsrequires every minimum-version matrix to be exactly[MINIMUM_BUN_VERSION, primary]. Newtest/runtime-version.test.tspins the refusal text, the doctor row, and the floor inpackage.jsonand the cloud setup script.- Doctor goldens scrub the running Bun version (
Bun <bun-version>). - If your local Bun is 1.3.x,
bun upgradebefore running the CLI or CLI-spawning tests.