pi-squad 0.19.4 → 0.19.5

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.19.5] - 2026-07-24
11
+
12
+ ### Fixed
13
+
14
+ - Terminal task failures are now reported to the main session immediately when the rest of the squad keeps running (new `squad-task-failed` notification with the exact task, agent, error, and repair guidance). Previously an individual agent death — e.g. `Agent devops exited before RPC response` — was invisible in chat until the whole squad stalled or finished. When no runnable work remains, the existing `squad-failed` summary is sent instead, never both.
15
+ - A task that completes after an interim failure (spawn retry, RPC race during reopen) no longer displays the stale error annotation forever; successful completion clears `task.error`.
16
+
10
17
  ## [0.19.4] - 2026-07-24
11
18
 
12
19
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-squad",
3
- "version": "0.19.4",
3
+ "version": "0.19.5",
4
4
  "description": "Multi-agent collaboration extension for pi — task decomposition, dependency management, parallel execution, TUI panel",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -66,6 +66,29 @@ export function wireSchedulerEvents(pi: ExtensionAPI, scheduler: Scheduler, squa
66
66
  }
67
67
  break;
68
68
  }
69
+ case "task_failed": {
70
+ // A task died terminally while the squad continues. Without this the
71
+ // main session learns about individual failures only when the whole
72
+ // squad later stalls or finishes. When no runnable work remains the
73
+ // imminent squad_failed event carries the failure summary instead, so
74
+ // skip the task-level message to avoid duplicate notifications.
75
+ try {
76
+ const tasks = store.loadAllTasks(squadId);
77
+ const squadContinues = tasks.some((task) => task.status === "in_progress" || task.status === "pending");
78
+ if (!squadContinues) break;
79
+ const failed = tasks.find((task) => task.id === event.taskId);
80
+ pi.sendMessage({
81
+ customType: "squad-task-failed",
82
+ content: `[squad] Task '${event.taskId}'${failed ? ` (${failed.agent})` : ""} FAILED in '${squadId}' while other tasks continue.\n` +
83
+ `Error: ${event.message ?? failed?.error ?? "unknown"}\n` +
84
+ `Dependents of this task stay blocked. Repair now with squad_modify — resume_task to retry it, set_dependencies to reroute, or cancel_task if obsolete — or the squad will stall after the remaining tasks finish.`,
85
+ display: true,
86
+ }, { triggerTurn: true, deliverAs: "followUp" });
87
+ } catch (error) {
88
+ logError("squad-scheduler", `task-failed delivery failed for ${squadId}/${event.taskId}: ${(error as Error).message}`);
89
+ }
90
+ break;
91
+ }
69
92
  case "squad_failed": {
70
93
  const tasks = store.loadAllTasks(squadId);
71
94
  const failed = tasks.filter((task) => task.status === "failed");
package/src/scheduler.ts CHANGED
@@ -994,8 +994,11 @@ export class Scheduler {
994
994
  .filter((m) => m.from === task.agent && (m.type === "text" || m.type === "done"));
995
995
  const output = agentMessages.map((m) => m.text).join("\n");
996
996
 
997
+ // Clear any interim failure annotation (spawn retry, RPC race): a task
998
+ // that ultimately completed must not display a stale error forever.
997
999
  store.updateTaskStatus(this.squadId, taskId, "done", {
998
1000
  output: output || "Task completed",
1001
+ error: null,
999
1002
  completed: store.now(),
1000
1003
  });
1001
1004