mosaic update: framework reseed skipped when CLI is updated outside mosaic update (stale tools/, incl. tmux helpers)
#642
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
After updating the CLI to a new version, the framework files in
~/.config/mosaic/(guides, launcher, andtools/— including the tmux helpersagent-send.sh/send-message.sh) remain at the OLD version. Observed in the field jumping a workstation 0.0.31 → 0.0.41: CLI read 0.0.41 but tmux tool was absent/stale.Root cause
mosaic updateonly re-seeds the framework when the update itself installs a newer@mosaicstack/mosaic. Frompackages/mosaic/src/cli.ts(update handler):So the reseed is skipped whenever the CLI reaches the new version by any path other than
mosaic updatedoing the npm install in that same run:npm i -g @mosaicstack/mosaic@Xdirectly (no postinstall → no reseed), ormosaic updatewhen mosaic is already current (nothing "outdated" →mosaicUpdatedfalse).The framework (incl.
tools/tmux/) is shipped in the package (files: ["dist","framework"]) — it's purely the sync-into-~/.config step that doesn't fire.Manual workaround
Proposed fix
Reseed based on on-disk framework version lag, not the npm "outdated" signal: compare
~/.config/mosaic/.framework-versionagainst the installed package's bundled framework version and reseed (keep-mode) whenever it trails — independent of how the CLI got upgraded. Optionally also run this reconcile on CLI startup /session-start.sh.Why it matters
A stale framework means shipped launcher/runtime/tooling changes silently don't activate — agents run old behavior while reporting the new version. (Surfaced during the dragon-lin 0.0.41 reseed work, 2026-06-23.)