@@ -43,6 +43,7 @@ type Model struct {
4343 focusID string
4444
4545 pendingProvider string
46+ startSwarm bool // auto-start idle myses on launch
4647
4748 // Swarm broadcast history
4849 swarmMessages []SwarmMessage
@@ -89,7 +90,7 @@ type EventMsg struct {
8990 }
9091
9192 // New creates a new TUI model.
92-func New(commander *core.Commander, s *store.Store, eventCh <-chan core.Event) Model {
93+func New(commander *core.Commander, s *store.Store, eventCh <-chan core.Event, startSwarm bool) Model {
9394 // Initialize spinner with hexagonal theme (matching logo)
9495 sp := spinner.New()
9596 sp.Spinner = spinner.Spinner{
@@ -113,6 +114,7 @@ func New(commander *core.Commander, s *store.Store, eventCh <-chan core.Event) M
113114 loadingSet: make(map[string]bool),
114115 viewport: vp,
115116 netIndicator: NewNetIndicator(),
117+ startSwarm: startSwarm,
116118 }
117119 }
118120
@@ -123,6 +125,11 @@ func (m *Model) SetOnQuit(fn func()) {
123125
124126 // Init initializes the model.
125127 func (m Model) Init() tea.Cmd {
128+ // Auto-start idle myses if flag enabled
129+ if m.startSwarm {
130+ go m.autoStartIdleMyses()
131+ }
132+
126133 return tea.Batch(
127134 m.netIndicator.Init(),
128135 m.refreshMyses(),
@@ -131,6 +138,17 @@ func (m Model) Init() tea.Cmd {
131138 )
132139 }
133140
141+// autoStartIdleMyses starts all myses in idle state (no error).
142+func (m Model) autoStartIdleMyses() {
143+ myses := m.commander.ListMyses()
144+ for _, mysis := range myses {
145+ // Start myses that are not errored (idle state)
146+ if mysis.LastError() == nil {
147+ _ = m.commander.StartMysis(mysis.ID())
148+ }
149+ }
150+}
151+
134152 // Update handles messages.
135153 func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
136154 var cmds []tea.Cmd