@yemi33/minions 0.1.1869 → 0.1.1870

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
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1870 (2026-05-11)
4
+
5
+ ### Fixes
6
+ - don't kill live agents on premature [process-exit] sentinel
7
+
3
8
  ## 0.1.1869 (2026-05-11)
4
9
 
5
10
  ### Other
package/engine/timeout.js CHANGED
@@ -381,8 +381,20 @@ function checkTimeouts(config) {
381
381
  const processExitCode = parseProcessExitCode(liveLogTail);
382
382
 
383
383
  if (processExitCode !== null) {
384
- completeFromOutput(item, liveLogPath, processExitCode, liveLogTail, hasProcess);
385
- continue; // Skip orphan/hung detection we handled it
384
+ // Guard: only complete (and kill) if the tracked process is actually dead.
385
+ // The sentinel can land in live-output.log while the child is still alive
386
+ // (race with the engine's stdout-forwarder appendFileSync writes, or a
387
+ // premature 'close' event on Windows). Without this guard, completeFromOutput
388
+ // taskkill /F /T's a still-working agent — surfaces as "phantom completion"
389
+ // mid-multi-turn session. Confirmed 2026-05-11: agents on both Copilot and
390
+ // Claude died at turn boundaries with claude/copilot.exe still actively
391
+ // making API calls, with the sentinel + claude events interleaved in the log.
392
+ if (processAlive) {
393
+ log('warn', `${item.id}: [process-exit] code=${processExitCode} sentinel found in live-output.log but tracked process (pid=${trackedProcessPid(procInfo) || '?'}) is still alive — treating sentinel as stale/premature, skipping completion`);
394
+ } else {
395
+ completeFromOutput(item, liveLogPath, processExitCode, liveLogTail, hasProcess);
396
+ continue; // Skip orphan/hung detection — we handled it
397
+ }
386
398
  }
387
399
  // Note: we DO NOT trigger on `"type":"result"` alone. There is a ~1s race between
388
400
  // claude CLI emitting the result event and spawn-agent.js writing [process-exit] —
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.1869",
3
+ "version": "0.1.1870",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"