add implementation plan for durable tmux fleet holder-service rollout
define generic Mosaic install/customization path instead of hardcoding USC roster
capture current-server evidence and safe named-socket rollout strategy
split follow-up work into tmux tool hardening, systemd primitives, roster/CLI, and docs
Key decisions
use holder-owned tmux server with per-agent systemd units
default to a separate named tmux socket to avoid disturbing existing sessions
expose mosaic fleet and mosaic agent abstractions so Matrix can replace tmux later
keep USC-style agent roster as an example profile, not a default
Validation
plan written under scratchpads/
current server discovery performed: tmux 3.4, user systemd active, existing default tmux sessions present, installed Mosaic 0.0.31
## Summary
- add implementation plan for durable tmux fleet holder-service rollout
- define generic Mosaic install/customization path instead of hardcoding USC roster
- capture current-server evidence and safe named-socket rollout strategy
- split follow-up work into tmux tool hardening, systemd primitives, roster/CLI, and docs
## Key decisions
- use holder-owned tmux server with per-agent systemd units
- default to a separate named tmux socket to avoid disturbing existing sessions
- expose `mosaic fleet` and `mosaic agent` abstractions so Matrix can replace tmux later
- keep USC-style agent roster as an example profile, not a default
## Validation
- plan written under `scratchpads/`
- current server discovery performed: tmux 3.4, user systemd active, existing default tmux sessions present, installed Mosaic 0.0.31
bash -n packages/mosaic/framework/tools/tmux/send-message.sh \
packages/mosaic/framework/tools/tmux/agent-send.sh \
packages/mosaic/framework/tools/tmux/test-send-message-socket.sh \
packages/mosaic/framework/tools/fleet/start-agent-session.sh \
packages/mosaic/framework/tools/fleet/test-start-agent-session.sh \
packages/mosaic/framework/systemd/user/test-fleet-units.sh
packages/mosaic/framework/tools/tmux/test-send-message-socket.sh
# ok - named tmux socket send tools
packages/mosaic/framework/tools/fleet/test-start-agent-session.sh
# ok - start-agent-session
packages/mosaic/framework/systemd/user/test-fleet-units.sh
# ok - fleet systemd unit templates
npm pack --dry-run --json
# confirmed new framework/tools/fleet, framework/tools/tmux, and framework/systemd/user files are included in package
Note: pnpm --filter @mosaicstack/mosaic test could not run in this checkout because node_modules/vitest are not installed locally. Shell/systemd/package checks passed.
PoC implementation pushed in `b464c39`.
Added:
- named-socket support for `framework/tools/tmux/send-message.sh` and `agent-send.sh` via `-L <socket>`
- exact target normalization for `=session` → `=session:0.0` on pane operations
- named-socket isolation smoke test: `framework/tools/tmux/test-send-message-socket.sh`
- fleet launcher: `framework/tools/fleet/start-agent-session.sh`
- fleet launcher test: `framework/tools/fleet/test-start-agent-session.sh`
- user systemd templates:
- `framework/systemd/user/mosaic-tmux-holder.service`
- `framework/systemd/user/[email protected]`
- systemd template validation: `framework/systemd/user/test-fleet-units.sh`
- PoC install/canary notes: `framework/systemd/user/README.md`
Validation run locally:
```bash
bash -n packages/mosaic/framework/tools/tmux/send-message.sh \
packages/mosaic/framework/tools/tmux/agent-send.sh \
packages/mosaic/framework/tools/tmux/test-send-message-socket.sh \
packages/mosaic/framework/tools/fleet/start-agent-session.sh \
packages/mosaic/framework/tools/fleet/test-start-agent-session.sh \
packages/mosaic/framework/systemd/user/test-fleet-units.sh
packages/mosaic/framework/tools/tmux/test-send-message-socket.sh
# ok - named tmux socket send tools
packages/mosaic/framework/tools/fleet/test-start-agent-session.sh
# ok - start-agent-session
packages/mosaic/framework/systemd/user/test-fleet-units.sh
# ok - fleet systemd unit templates
npm pack --dry-run --json
# confirmed new framework/tools/fleet, framework/tools/tmux, and framework/systemd/user files are included in package
```
Note: `pnpm --filter @mosaicstack/mosaic test` could not run in this checkout because `node_modules`/`vitest` are not installed locally. Shell/systemd/package checks passed.
Update: amended PoC commit to 28a669a after local Prettier check caught the scratchpad table formatting that failed CI format on superseded pipeline 1230.
Additional validation:
npx --yes prettier@3 --check \
scratchpads/2026-06-19-tmux-fleet-durable-install-plan.md \
packages/mosaic/framework/tools/tmux/README.md \
packages/mosaic/framework/systemd/user/README.md
# All matched files use Prettier code style!
As of last poll both are still running at install/ci-postgres. No new failure observed yet.
Update: amended PoC commit to `28a669a` after local Prettier check caught the scratchpad table formatting that failed CI format on superseded pipeline `1230`.
Additional validation:
```bash
npx --yes prettier@3 --check \
scratchpads/2026-06-19-tmux-fleet-durable-install-plan.md \
packages/mosaic/framework/tools/tmux/README.md \
packages/mosaic/framework/systemd/user/README.md
# All matched files use Prettier code style!
```
Fresh CI after force-with-lease push:
- push: https://ci.mosaicstack.dev/repos/47/pipeline/1231/1
- PR: https://ci.mosaicstack.dev/repos/47/pipeline/1232/1
As of last poll both are still running at install/ci-postgres. No new failure observed yet.
Scope note: agreed with USC split. framework/tools/tmux remains the inter-agent messaging layer; fleet ownership/lifecycle primitives are under framework/systemd/user and framework/tools/fleet, not mixed into tmux comms.
USC tmux-fleet context reconciled against the Stack PoC.
Verified AI Guide source:
- `mosaicstack/aiguide:playbooks/tmux-fleet.md`
- commit `2a0b0b5`
Alignment changes in current Stack head `757f5e6`:
- added explicit references to the AI Guide playbook in the Stack implementation plan and systemd README
- changed `[email protected]` `ExecStop` to the playbook's exact session target form: `kill-session -t "=%i"`
- added a regression check so the unit template must keep exact-match per-agent stop behavior
Re-run local validation after alignment:
```bash
bash -n packages/mosaic/framework/systemd/user/test-fleet-units.sh \
packages/mosaic/framework/tools/fleet/start-agent-session.sh \
packages/mosaic/framework/tools/fleet/test-start-agent-session.sh \
packages/mosaic/framework/tools/tmux/send-message.sh \
packages/mosaic/framework/tools/tmux/agent-send.sh \
packages/mosaic/framework/tools/tmux/test-send-message-socket.sh
packages/mosaic/framework/systemd/user/test-fleet-units.sh
# ok - fleet systemd unit templates
packages/mosaic/framework/tools/fleet/test-start-agent-session.sh
# ok - start-agent-session
packages/mosaic/framework/tools/tmux/test-send-message-socket.sh
# ok - named tmux socket send tools
npx --yes prettier@3 --check \
scratchpads/2026-06-19-tmux-fleet-durable-install-plan.md \
packages/mosaic/framework/systemd/user/README.md \
packages/mosaic/framework/tools/tmux/README.md
# All matched files use Prettier code style!
```
Fresh CI after this force-with-lease push:
- push: https://ci.mosaicstack.dev/repos/47/pipeline/1233/1
- PR: https://ci.mosaicstack.dev/repos/47/pipeline/1234/1
Scope note: agreed with USC split. `framework/tools/tmux` remains the inter-agent messaging layer; fleet ownership/lifecycle primitives are under `framework/systemd/user` and `framework/tools/fleet`, not mixed into tmux comms.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Key decisions
mosaic fleetandmosaic agentabstractions so Matrix can replace tmux laterValidation
scratchpads/PoC implementation pushed in
b464c39.Added:
framework/tools/tmux/send-message.shandagent-send.shvia-L <socket>=session→=session:0.0on pane operationsframework/tools/tmux/test-send-message-socket.shframework/tools/fleet/start-agent-session.shframework/tools/fleet/test-start-agent-session.shframework/systemd/user/mosaic-tmux-holder.serviceframework/systemd/user/[email protected]framework/systemd/user/test-fleet-units.shframework/systemd/user/README.mdValidation run locally:
Note:
pnpm --filter @mosaicstack/mosaic testcould not run in this checkout becausenode_modules/vitestare not installed locally. Shell/systemd/package checks passed.b464c39fc7to28a669a89cUpdate: amended PoC commit to
28a669aafter local Prettier check caught the scratchpad table formatting that failed CI format on superseded pipeline1230.Additional validation:
Fresh CI after force-with-lease push:
As of last poll both are still running at install/ci-postgres. No new failure observed yet.
28a669a89cto757f5e6998USC tmux-fleet context reconciled against the Stack PoC.
Verified AI Guide source:
mosaicstack/aiguide:playbooks/tmux-fleet.md2a0b0b5Alignment changes in current Stack head
757f5e6:[email protected]ExecStopto the playbook's exact session target form:kill-session -t "=%i"Re-run local validation after alignment:
Fresh CI after this force-with-lease push:
Scope note: agreed with USC split.
framework/tools/tmuxremains the inter-agent messaging layer; fleet ownership/lifecycle primitives are underframework/systemd/userandframework/tools/fleet, not mixed into tmux comms.