Skip to content

Agent sidecar synchronization internals

This page documents the implementation boundaries behind agent sidecar synchronization.

Scope and reconciliation

Targeted publication refreshes exactly the committing agent's complete top-level hood. Full reconciliation publishes every locally owned project hood with at least one primary-repository commit association. Commit-less plan members, active siblings, failed/waiting runs, dismissed archives, and structural session/clan containers are included when they belong to that hood.

After an agent-backed commit or pull-request operation records its first durable result marker, the commit workflow resolves the project's agents target. When that target is available, SASE records an outbox request for the exact hood and immediately drains it under the bounded agents lock, so the commit does not return until the hood is published and pushed (or the request is confirmed queued for retry). A publication that cannot even be queued fails the commit with a sase stitch create --resume hint; a request that survives the immediate drain — because of a transient, hood-specific, or repository-wide failure — prints a warning naming the recovery command and is retried by a later commit's drain or by an explicit sase agent sync. See runtime provenance and publication.

Published runs that are temporarily missing from local inventory are retained. New terminal state, commits, prompt data, and chat refresh the same stable run; absence does not create an implicit deletion or tombstone. Identical inputs produce byte-identical files and a no-op publication.

After each pull/rebase, SASE rebuilds root, user, machine, hood, session, and agent Markdown from every validated owner manifest. Index and neighbor pages link a specific run, so their session member links use stable member-<role> anchors; solo links target the corresponding agent README. Commit footers are the other case: they identify a sase agent rather than a run, so they link the session page with no member anchor (see runtime provenance). Because owners mutate disjoint authority files, a bounded non-fast-forward retry can pull a competing owner, recompute the shared views, and converge without overwriting either snapshot.

_[project]: A sase project is a named unit of work registered with SASE. _[workspace]: A sase workspace is a numbered clone of a project's primary repo, managed by the workspace store and tracked in that project's registry.json. _[agent]: A sase agent is an agent session or a single agent that does not belong to a session. _[prompt]: A prompt is the text SASE hands to a provider to start an agent turn. _[macro]: A macro is a reusable prompt triggered with #name in agent prompts. _[Patch]: A Patch is SASE's local unit of change. _[bead]: A bead is one tracked work item in SASE's git-native issue tracker. _[plan]: A plan is a persisted, approved artifact recording the intent behind agent work. _[TUI]: The TUI is SASE's terminal interface for running agents and reviewing results. _[epic]: An epic is an executable multi-phase plan run with sase bead work. _[gate]: A sase gate is a durable, command-backed request for one user decision, created when work must pause for the user. _[monitor]: A sase monitor is a monitor turn that runs one long command under a detached supervisor, so the command outlives the agent that started it. *[stitch]: A stitch is the lightweight ordered change record inside a Patch's STITCHES: section.