Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(changelog): #8424 entry names the review fixes
garrytanb4a04e467a6a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 6fbf0199ba..25602fac65 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,10 +14,11 @@ identifiers and attribution are available in the pre-removal Git revision**Security: gbrain's hooks no longer let the session directory's bunfig.toml or .env run (#8424).** A script-mode install (`bun install -g`, `bun link`) runs gbrain as a Bun script, and Bun applies the working directory's `bunfig.toml` (a top-level `preload` runs before any gbrain code) and loads its `.env` files first. Claude Code and Codex run hooks in the session's directory, so with the hooks `gbrain setup claude-code|codex` writes, or the per-turn rule hook from `--instructions-only`, `gbrain connect --install` and `gbrain bootstrap harness`, opening a session in a cloned repository ran that repository's code as you on every prompt, with nothing to approve. Each of those hooks now starts gbrain through `<gbrain config dir>/hook-launcher/gbrain-hook`, a small sh script that records the session directory in `GBRAIN_HOOK_CWD`, changes into its own directory and starts gbrain there. Its directory holds only the launcher, and it refuses to start gbrain if anything else appears there.-- `gbrain post-upgrade` moves existing hooks onto the launcher: the turn-rule hook in Claude Code's user settings and Codex's hooks.json, and the hooks of each user-scope `gbrain setup` install whose MCP entry is unchanged. `gbrain setup <harness>` and `gbrain setup <harness> --instructions-only` rewrite them on their next run.+- `gbrain post-upgrade` moves existing hooks onto the launcher. That covers the turn-rule hook in Claude Code's user settings and in Codex's hooks.json, and the hooks of each user-scope `gbrain setup` install whose MCP entry is unchanged. A Codex hook moves only when Codex already runs it, so an upgrade never trusts a hook you did not approve, and a hook you edited after setup wrote it is kept and named instead. `gbrain setup <harness>` and `gbrain setup <harness> --instructions-only` rewrite them on their next run.- `gbrain doctor` (`harness_wiring`) warns with the new code `hook_session_cwd` when a hook still starts gbrain in the session directory, or its launcher is missing, changed or shares its directory with a file gbrain did not write, and names the setup command that fixes it. Project-scope installs get the command to run from their project directory.- Not covered yet: the stdio MCP server `gbrain setup` registers, which the harness also starts in the session's directory (#8426); the capture hooks from `gbrain bootstrap`'s own lanes and the gbrain plugins' hooks (#8428); and script-mode commands you run by hand in an untrusted checkout (SECURITY.md).- The launcher rewrite never leaves a temp file in its own directory, and doctor finds a setup hook whose `_gbrain` marker Claude Code dropped by its receipt hash.+- `gbrain hook` resolves the recorded session directory the way the shell's working directory resolves, so project-scope rules still match under a symlinked path, and a `.env` in the session directory cannot set `GBRAIN_HOOK_CWD`.## [0.60.546.0] - 2026-11-02