Garry's Opinionated OpenClaw/Hermes Agent Brain
Upgrade to v0.60.20.0: fix wave 4
Fix wave 4 fixes managed syncs that wedged on large request tables, connector sources that one bad item stopped forever, managed upgrade migrations that stayed stuck, and several lifecycle gaps (leaving managed mode, stuck embedding effects, bindings left by removed sources). Never apply a repair, raise a limit or clear a wedged marker on the user's behalf without asking.
Schema migrations (automatic)
Five schema migrations run on gbrain upgrade (or gbrain apply-migrations --yes). None deletes a page, a receipt or a write ID, and a rerun changes
nothing:
- 179 builds the managed sync request indexes
persistence_requests_sync_run_openandpersistence_requests_sync_run_committed. On Postgres it runsCREATE INDEX CONCURRENTLY, one index at a time, so writes continue; on a largepersistence_requeststable it can take minutes and printsbuilding <index> on ~N rows; this can take minutes; it is safe to leave running. - 180 adds the nullable
pages.links_attendance_blocked_revisionandlinks_attendance_blocked_atcolumns (the attendance marker, #5761). - 181 (handler) records a first sync attempt for every Google and GitHub
source the previous autopilot dispatched (a non-null
local_pathand notsyncEnabled=false). Autopilot now dispatches a connector only after a recorded attempt, so no source autopilot synced before the upgrade goes idle. - 182 adds the nullable
page_versions.source_path, sopersistence.unbound_write=database_onlyjudges a revert on the version it writes. Older versions count as file-less. - 183 adds
persistence_brain.mode_epochand theretiredworktree state forgbrain sources writer deactivate.
Upgrade order on multi-host brains
Upgrade the hosts that run the persistence consumer before connector hosts, as
in v0.60.11.0. An older consumer refuses a new connector's page writes
(revision_conflict) instead of losing data, and they commit once the consumer
is upgraded.
Managed sync: request indexes, the checkpoint timeout and working-tree skips (#5762, #5751, #5522)
Never apply a repair or raise a limit on the user's behalf without asking.
- Check the indexes. Run
gbrain doctorand readpersistence_request_indexes. If it namesgbrain repair request-indexes --apply(an index is missing or INVALID after an interrupted build), show the usergbrain repair request-indexes(preview), then apply it after they agree. If it says an index is still building, leave it running. - Clear a timed-out sync checkpoint. If a sync printed
checkpoint_validation_timeout, run the commands it printed, in order: the rebuild when the hint says an index is missing or INVALID, then the printedgbrain sync --source <id> --no-pull --retry-failed …(it keeps the run's saved--no-embed/--no-extract/--no-schema-packflags). Do not cancel the checkpoint request: a cancelled checkpoint still blocks the next. - Check request-table growth. Read
persistence_request_growthingbrain doctor --json. When it warns, tell the user which writer runs out of lifetime request IDs and when, and offer the printedgbrain config set persistence.limits.<limit> <value>. Request IDs are permanent; raising the limit is the only intervention. Re-run the check to verify. - Working-tree syncs. A managed working-tree sync now skips an unchanged
legacy file whose page has no contextual retrieval mode, or whose bytes are
not valid UTF-8, instead of admitting it every run. When the sync summary
prints
legacy file(s) skipped … no contextual retrieval mode, previewgbrain repair contextual-modewith the user and apply it after they agree. When it prints… not valid UTF-8, list the files withfind <checkout> -name '*.md' ! -exec iconv -f UTF-8 -t UTF-8 -o /dev/null {} \; -printand ask the user whether to re-save them as UTF-8. - Verify:
gbrain doctorshowspersistence_request_indexesok, andgbrain sources statusshows each managed source'slast_commitadvancing after its next sync.
Connectors: held items, the dispatch gate and fence refusals (#5752, #5740, #5739, #5581, #5438, #5673)
Nothing here needs a command. Tell the user, and ask before running anything that changes the brain:
Held items. A Google or GitHub item that fails three syncs in a row is held instead of wedging the source. Existing Gmail poison-ledger entries (
gmail_fail_counts) are carried over once: a thread that failed three or more times becomes a held item with unknown sender, subject and date. Check with:gbrain sources status # held items per source gbrain doctor # connector_held_itemsAfter the user agrees and the cause is fixed:
gbrain sources retry-held <id> --dry-run gbrain sources retry-held <id> gbrain sync --source <id> gbrain sources status <id> # a recovered item leaves the listA connector source that has never synced now stays idle under autopilot and prints one notice. Run
gbrain sync --source <id>once to enable it.connector_fence_below_timeline. A managed connector sync may refuse a page whose facts or takes fence sits below its timeline. Previewgbrain repair connector-fences --source <id>, apply it after the user agrees with--apply, thengbrain sources retry-held <id>.gbrain waitingmay now say coverage is partial and name held Gmail threads. Present that answer as partial.
The managed migration chain, atoms and facts (#5728, #5721, #5699, #5725, #5627, #5705, #5733, #5634)
On a managed brain the v0.28.0 takes backfill and the v0.32.2 facts backfill
now publish through the persistence coordinator. Before this release v0.28.0
was refused by the managed writer guard, recorded partial three times and
then wedged, and every later migration stayed pending behind it. v0.32.2 is
now also run on managed brains, including database-only pages; it adopts the
legacy fact rows in place, so fact ids, vectors and extractor rows are kept.
Never raise a limit or clear a wedged marker on the user's behalf without asking.
Check whether the chain is stuck.
gbrain apply-migrations --listA
wedgedstatus on0.28.0means a pre-upgrade run gave up. After the user agrees, clear that marker once:gbrain apply-migrations --force-retry 0.28.0Run the chain.
gbrain apply-migrations --yesOn a managed brain this finishes v0.28.0, v0.29.1, v0.31.0, v0.32.2, v0.43.0 and v0.46.3. A run with nothing pending prints "All migrations up to date".
If a migration refuses with
queue_capacity. The brain or the migration writer has used up its permanent request IDs. The refusal happens before any page changes and prints the exact command, for examplegbrain config set persistence.limits.principal_lifetime_ids <value>. Show the user the command and the value; after they agree, run it and repeat step 2.Verify.
gbrain apply-migrations --list gbrain doctorEvery orchestrator migration should read
applied.0.14.0and0.53.0may still list host work; that is expected.
Other changes in this part need no action: legacy database-only atoms can now
be stamped by gbrain repair visibility, an explicit atom retry survives a
revision-only page change, remember on fact-heavy pages no longer times out,
patterns pages carry dream_generated, and unify-types apply refuses up
front on a managed brain (its dry run still previews).
Lifecycle: upgrade outcome, orphan bindings, embedding effects, deactivate (#5693, #5732, #5629, #5734, #5673, #5393, #5455, #5628)
gbrain upgradenow ends with aBinary:line and a separateMigrations:line.Migrations: running (host …, pid …)means anotherapply-migrationsholds the orchestration lock; wait for it, then rungbrain apply-migrations --yesto confirm.- Run
gbrain doctor. Preview and, after the user agrees, apply what it names:gbrain repair orphan-bindings(bindings left by removed sources) andgbrain repair embedding-effects --source <id>(stuck embedding effects). Both appear ingbrain doctor --remediation-plan. - A connector source autopilot never synced stays idle until
gbrain sync --source <id>runs once. Clear a connector's stale folder withgbrain sources set-path <id> --clear. - To leave managed mode, follow
docs/architecture/topologies.md#deactivate-runbook. Older binaries still honor local managed markers, so after deactivating rungbrain sources writer statusonce on every other host before an older binary writes there.
The min_writer_version floor stays deferred: while a brain is managed the
database writer guard is the enforcement, and after deactivation that guard is
inert.
Links, capture, search, CLI and ingestion (#5749, #5701, #5691, #5671, #5761, #5742, #5765)
No step here changes the brain without the user's agreement.
Frontmatter links the stale sweep moved (#5749). On brains with
link_resolution.global_basename=true, the managed stale-link sweep could re-point a bare frontmatter wikilink (for examplerelated: [[topic]]) at a transcript that repeats the term. This release moves the link extractor watermark, so every page re-extracts links once. Let the next sync or autopilot cycle run, or, with the user's agreement, run it now:gbrain extract --stale --catch-up --include-frontmatterQuery instruction prefix (#5691, #3783). Nothing changes unless the user sets it. If
gbrain doctorreportsembedding_query_prefix, show the user the command it prints and run it only if they agree. It affects query embeddings only; stored vectors are not re-embedded. Undo withgbrain config unset embedding_query_prefix.Private facts over HTTP (#5671). If doctor's
memory_writebackcheck warns thatfacts.default_visibilityis private while agents read the brain over MCP or HTTP, ask the user whether those agents need to recall their own facts. If yes:gbrain config set facts.default_visibility world, thengbrain bootstrap harness --yesto refresh the installed instruction blocks (their private-posture text changed and shows as drifted until refreshed).Attendance-blocked meeting pages (#5761). Doctor's
links_extraction_lagreports meeting pages that wait on an unresolved attendee in their own count.Historical dates (#5742). Pages whose explicit frontmatter date is before 1990 were dated by ingest time. With the user's agreement, preview and apply the recompute:
gbrain reindex-frontmatter --dry-run gbrain reindex-frontmatter --yesMeeting pages with a bold
**Attendees:**line (#5765) gain their attended edges on the nextgbrain extract --stale(the step 1 run covers it).Long sessions (#5701). Claude Code and Codex sessions over 50 MiB are captured again from their recent tail. No action.
Verify: gbrain doctor shows no embedding_query_prefix warning (or the user
chose not to set one), and gbrain get <page> --include-timeline-entries
returns the page's timeline rows.