feat(daemon): reconstruct managed session catalog - #1261
Open
sethkarten wants to merge 27 commits into
Open
Conversation
This was referenced Aug 11, 2026
sethkarten
marked this pull request as ready for review
August 12, 2026 06:00
sethkarten
force-pushed
the
core03-managed-session-catalog
branch
from
August 12, 2026 18:34
4e1b046 to
4f87ab5
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d685ec4. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Stack
core02-host-request-dispatcher)Validation
Exclusions
Note
High Risk
Changes authorization for agent-to-agent messaging, observation, and session topology across daemon and supervisor; incorrect catalog merge or trusted-read bugs could deny service or mis-scope reach.
Overview
Replaces ad-hoc sibling/registry lookups with
listCatalogFamilySessions, which walks RLM registries under descriptor-anchored (O_NOFOLLOW) managed roots, reads session bytes via a trusted openat helper (no pathname reopen), and fails closed on cycles, symlink/path tricks, registry limits, and header/registry mismatches. Catalog RPC gainsfamily;siblingsand name checks takesessionDir.Daemon and supervisor build one frozen
agentFamilyCatalogEntries/familyCatalogEntriessnapshot from persisted, artifact, passive, resident, and remote rows (merge only when topology claims agree; duplicates/conflicts deny ACLs). Agent-origin send, observe, roster, and cross-worker wake/delivery use that snapshot end-to-end—including post-wake session-id checks so hydration cannot substitute a different target.agent-messagestightens nuclear-family logic: siblings need a single catalog-resolved parent, parent edges reject contradictory id+path claims, and passive rows can reserve names via direct parent claims without widening reach.readSessionInfoFromBufferparses metadata from already-trusted bytes.Protocol schema revision 17 adds optional
sessionDiron detachedrename_saved_sessionso inactive renames use the correct catalog authority.Reviewed by Cursor Bugbot for commit 3bc6523. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Reconstruct managed session catalog with TOCTOU-safe family traversal and snapshot-based ACL enforcement
listCatalogFamilySessionsin daemon-catalog-process.ts, which traverses the full session artifact tree using descriptor-bound (O_NOFOLLOW) opens and a Pythonopenatsidecar to prevent symlink/rename races during reads.sessionDiris threaded through rename, sibling lookup, name-availability, and worker-creation flows so that catalog authority is always scoped to the correct root.rename_saved_sessionnow requires protocol ≥7 and schema ≥17 and accepts an optionalsessionDirfield.Macroscope summarized 3bc6523.