Don't resurrect exited terminals on daemon restart

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-18 17:53:29 -07:00
co-authored by Claude Fable 5.1
parent 44e85b768f
commit 1ee4673d7c
+2
View File
@@ -158,8 +158,10 @@ func serve(cfg *config.Config) error {
_ = st.Update(func(s *store.State) {
s.Terminals = s.Terminals[:0]
for _, t := range list {
if t.Running { // an exited shell must not come back from the dead on restart
s.Terminals = append(s.Terminals, store.Terminal{ID: t.ID, Name: t.Name})
}
}
})
}
// Re-open the shells that existed before the last restart (fresh processes,