@phren/cli 0.3.55 → 0.3.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,8 +67,13 @@ export function nextTurn(previous, event) {
67
67
  record.at = at;
68
68
  if (event.dispatch && briefId.safeParse(event.dispatch).success)
69
69
  record.dispatch ??= event.dispatch;
70
- if (event.event === "SessionStart")
70
+ if (event.event === "SessionStart") {
71
71
  record.startedAt ??= at;
72
+ // A resumed or cleared conversation in the same terminal no longer runs the background agents its
73
+ // last Stop counted; a compaction keeps them.
74
+ if ((event.start === "resume" || event.start === "clear") && record.stop?.background !== undefined)
75
+ delete record.stop.background;
76
+ }
72
77
  else if (event.event === "UserPromptSubmit")
73
78
  record.prompt = { seq: record.seq, at };
74
79
  else {