@yemi33/minions 0.1.456 → 0.1.458

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,8 +1,10 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.456 (2026-04-07)
3
+ ## 0.1.458 (2026-04-07)
4
4
 
5
5
  ### Fixes
6
+ - steering resume failure no longer burns retry slots or flips status
7
+ - shared-branch worktree creates branch from main if not found
6
8
  - pre-dispatch live vote check prevents reviewing approved PRs
7
9
 
8
10
  ## 0.1.455 (2026-04-07)
package/engine.js CHANGED
@@ -319,6 +319,11 @@ function spawnAgent(dispatchItem, config) {
319
319
  log('info', `Shared branch ${branchName} already checked out at ${existingWtPath} — reusing`);
320
320
  worktreePath = existingWtPath;
321
321
  } else { throw eShared; }
322
+ } else if (eShared.message?.includes('invalid reference') || eShared.message?.includes('not a valid ref')) {
323
+ // Branch doesn't exist yet (first item in plan) — create it from main
324
+ const mainRef = sanitizeBranch(shared.resolveMainBranch(rootDir, project.mainBranch));
325
+ log('info', `Shared branch ${branchName} not found — creating from ${mainRef}`);
326
+ runWorktreeAdd(rootDir, worktreePath, `-b "${branchName}" ${mainRef}`, _worktreeGitOpts, worktreeCreateRetries);
322
327
  } else { throw eShared; }
323
328
  }
324
329
  } else {
@@ -613,11 +618,23 @@ function spawnAgent(dispatchItem, config) {
613
618
  });
614
619
 
615
620
  // Re-wire close handler for the resumed process
616
- resumeProc.on('close', onAgentClose);
621
+ resumeProc.on('close', (resumeCode) => {
622
+ if (resumeCode !== 0) {
623
+ // Resume failed — don't burn a retry slot. Complete the dispatch as success
624
+ // (the original work was already done up to the kill point) and let the
625
+ // work item be re-discovered on the next tick if still pending.
626
+ log('warn', `Steering resume for ${agentId} exited with code ${resumeCode} — completing dispatch without error`);
627
+ activeProcesses.delete(id);
628
+ completeDispatch(id, DISPATCH_RESULT.SUCCESS, 'Steering resume failed but original work completed', '', { processWorkItemFailure: false });
629
+ return;
630
+ }
631
+ // Successful resume — run normal close handler
632
+ onAgentClose(resumeCode);
633
+ });
617
634
  resumeProc.on('error', (err) => {
618
- log('error', `Steering re-spawn failed for ${agentId}: ${err.message}`);
635
+ log('warn', `Steering re-spawn error for ${agentId}: ${err.message}`);
619
636
  activeProcesses.delete(id);
620
- completeDispatch(id, DISPATCH_RESULT.ERROR, `Steering re-spawn error: ${err.message}`);
637
+ completeDispatch(id, DISPATCH_RESULT.SUCCESS, 'Steering re-spawn error but original work completed', '', { processWorkItemFailure: false });
621
638
  });
622
639
 
623
640
  // Don't run completion hooks — agent is still working
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.456",
3
+ "version": "0.1.458",
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"