Observe native Claude automations and preserve pending timers

This commit is contained in:
2026-11-08 15:52:22 +00:00
parent 9d3358be47
commit 3fbfb85ace
17 changed files with 757 additions and 34 deletions
+5
View File
@@ -249,6 +249,7 @@ func (c *Chat) connectHostContext(ctx context.Context, record claudehost.Record)
p.link.tasksIncomplete.Store(status.Tasks == nil && status.Base > 0)
p.stderr.WriteString(status.Stderr)
p.models, p.account, p.appliedModel = models, account, status.Model
p.automations = status.Automations
plan := replayPlan{base: status.Base, silentUntil: status.Acked, catchUpEnd: status.End, pending: map[string]bool{}, busyAtAcked: status.BusyAtAcked, restore: true, tasks: status.Tasks}
for _, pending := range status.Pending {
plan.pending[pending.ID] = true
@@ -267,6 +268,10 @@ func (c *Chat) connectHostContext(ctx context.Context, record claudehost.Record)
func (s *session) adoptLocked(p *process) {
s.models, s.account = p.models, p.account
s.appliedModel = p.appliedModel
if p.automations != nil {
s.automations = p.automations
s.automationProcess = p
}
if s.model == "" {
s.model = p.appliedModel
}