Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
5.2 KB
Raw Blame

Upgrade to v0.60.28.0: fix wave 5

Fix wave 5 removes the session-start line that could show another session's text, lets repos over ~10,000 files onboard, unblocks jobs queued before v0.50, adds two preview-bound cleanups (gbrain repair stale-atoms and gbrain repair extractor-facts) and a projection drain, and fixes more than a dozen smaller bugs. There is no schema migration. Never apply a repair, authorize or cancel jobs, or change a key on the user's behalf without asking.

What the user will notice

  • Session start no longer shows a Last session activity line. It was taken from whichever session on the machine wrote last (#5558). Nothing restores it, by design.
  • Ambient recall (volunteer_context for remote callers, the per-turn hook block) and gbrain compile-context no longer show private pages.
  • Code pages re-chunk once (CHUNKER_VERSION 7 → 8) on the next sync or gbrain embed --stale.
  • gbrain doctor may report legacy_job_authority, text_projection_readiness, atom_provenance_drift, extractor_facts_expired or embedding_key_source.
  • gbrain repair --all and gbrain doctor --remediate list stale-atoms and extractor-facts with a preview command (explicit_kind_required) instead of running them.
  • A non-default brain's autopilot job gets its own name and logs to <brain>/.gbrain/autopilot.log.
  • A command may print one warning that an exported provider key (for example OPENAI_API_KEY) differs from the config key. The environment key is still the one in effect.

Step 1: restart everything that runs gbrain

Most fixes apply only in a process running the new binary. Tell the user, then, with their agreement and in this order:

  1. Stop autopilot and workers.
  2. Stop each resident gbrain serve: HTTP services through their service manager, stdio servers by quitting the harness that started them.
  3. Run gbrain upgrade on each host.
  4. Run gbrain --version through each launcher's own binary path (service definition, harness MCP command, hook commands); each must print 0.60.28.0.
  5. Restart services, harnesses, workers and autopilot.
  6. Make one write from each host and check that host's last_seen in gbrain sources writer status --json (writer_versions[]). That list is history from retained requests, not proof that every process upgraded.

If the user set GBRAIN_HOOKS=0 to work around #5558, ask them to remove it from the environment the harness starts from (shell profile or service) and restart the harness. It also turned off session capture, session persistence and crash recovery. Verify: a new session shows no Last session activity line, and after a few turns gbrain doctor reports bootstrap_hooks_heartbeat.

Step 2: run doctor and recover in order

Run gbrain doctor, show the user what it names, and handle each finding in this order. Preview first and apply only after the user agrees.

  1. Legacy jobs (legacy_job_authority). Stop gbrain serve, autopilot and workers. Cancel each active job doctor lists (gbrain jobs cancel <id>). Preview with gbrain jobs authorize-legacy --select "status=waiting|delayed|waiting-children|paused", show the user the counts and any paid job names, then apply with the printed --expect <hash> --yes. To drop the work instead, use gbrain jobs cancel --select "<filter>" and its printed apply command. Restart, then check legacy_job_authority is ok.
  2. Projections (text_projection_readiness). Run gbrain projections drain on Postgres, or on PGLite when no resident holds the brain. If it refuses with projection_owner_resident, either let the upgraded resident drain it (watch the pending count in doctor) or, with the user's agreement, run the stop, drain and restart commands it prints.
  3. Stale atoms (atom_provenance_drift). gbrain repair stale-atoms --source <id> previews; after the user reviews it, gbrain repair stale-atoms --source <id> --apply --expect <hash>. Retired atoms are soft-deleted and recoverable with restore_page for 72 hours.
  4. Extractor facts (extractor_facts_expired). gbrain repair extractor-facts previews; after review, gbrain repair extractor-facts --apply --expect <hash>. Ambiguous facts restore only if the user asks: add --include-ambiguous to both the preview and the apply.
  5. Run gbrain doctor again, then gbrain doctor --remediation-plan for the automatic repair kinds.

Step 3: other one-time actions

  • Several brains on one host: run GBRAIN_HOME=<brain parent> gbrain autopilot --install for each non-default brain, then for the default brain. gbrain autopilot --status --json should show job.needs_reinstall: null.
  • Key warning: to use the config key, remove the variable from the environment of the process that printed the warning and restart it; if the environment key is intended, gbrain config unset <config key>.
  • Inline harness token (#5775): if a harness config file holding an inline token was exposed, follow the receipt's if_exposed command on the brain host, then reconnect with --fresh-token.

The full symptom table, with preview, apply and verify commands for each issue, is in docs/guides/repair.md#fix-wave-5.