fix(cli): quiet Reflex history-sync diagnostics during startup

Merged
WI
4mo ago
+7159-92

Behavior

agent-relay up keeps Reflex history-sync diagnostics out of normal startup output. With --log-file, they land in the structured node log stream ([reflex] scope, sync failures as warnings). With --verbose, they also print to the interactive terminal.

Previously every [reflex] maintenance message — periodic sync ticks and cloud sync failures alike — printed straight into the broker's startup output on every up.

Also carries trail housekeeping: compacts trajectory traj_rtyte8r4g07t into completed/2026-07/ and records the view-detach decisions on the active trajectory.

Verification

  • vitest run packages/cli/src/cli/lib/broker-lifecycle.test.ts — 37 passed, including new coverage for suppressed default output, --verbose passthrough, and structured log-file routing with warn-level sync failures
  • tsc --noEmit (packages/cli) — clean

🤖 Generated with Claude Code