@yemi33/minions 0.1.922 → 0.1.924

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,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.922 (2026-04-13)
3
+ ## 0.1.924 (2026-04-13)
4
4
 
5
5
  ### Features
6
6
  - add /api/work-items/reopen endpoint and reopen-work-item CC action (#982)
@@ -19,6 +19,8 @@
19
19
  - add red dot notification on CC tab when response completes (#934) (#946)
20
20
 
21
21
  ### Fixes
22
+ - CC streaming auto-retries fresh session when resume fails
23
+ - 429 retry on abort race applies to all sends, not just queued
22
24
  - show actionable failure context instead of Unknown error (#1003)
23
25
  - prioritize error_max_turns over permission-blocked in classifyFailure (#1001)
24
26
  - optimistic archive hides both PRD and linked source plan simultaneously
@@ -38,6 +40,7 @@
38
40
  - prohibit agents from self-merging their own PRs
39
41
 
40
42
  ### Other
43
+ - test(preflight): add unit tests for findClaudeBinary, runPreflight, printPreflight, checkOrExit (#953)
41
44
  - test(meeting): add unit tests for key functions (#957)
42
45
  - [E2E] Architecture meeting Tier 1+2: 6 correctness bugs + 2 nested lock violations + log buffering (#972)
43
46
 
@@ -538,12 +538,11 @@ async function _ccDoSend(message, skipUserMsg, forceTabId) {
538
538
  });
539
539
 
540
540
  if (!res.ok) {
541
- // 429 = server still processing previous request (abort race) — retry silently up to 3 times
541
+ // 429 = server still releasing previous request (abort race) — retry silently up to 3 times
542
542
  if (res.status === 429 && (!activeTab._429retries || activeTab._429retries < 3)) {
543
543
  activeTab._429retries = (activeTab._429retries || 0) + 1;
544
- _cleanupStreamDiv();
545
544
  await new Promise(function(r) { setTimeout(r, 1500); });
546
- return await _ccDoSend(message, true);
545
+ return await _ccDoSend(message, true); // retry with skipUserMsg=true (already displayed)
547
546
  }
548
547
  activeTab._429retries = 0;
549
548
  _cleanupStreamDiv();
package/dashboard.js CHANGED
@@ -3493,17 +3493,38 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3493
3493
  trackUsage('command-center', result.usage);
3494
3494
 
3495
3495
  // Handle failure — non-zero exit with text = max_turns or partial success, still usable
3496
+ if (!result.text && wasResume && result.code !== 0) {
3497
+ // Resume failed (stale/expired session) — auto-retry as fresh session
3498
+ console.log(`[CC-stream] Resume failed (code=${result.code}) — retrying fresh`);
3499
+ const freshPreamble = buildCCStatePreamble();
3500
+ const freshPrompt = (freshPreamble ? freshPreamble + '\n\n---\n\n' : '') + body.message;
3501
+ const retryPromise = callLLMStreaming(freshPrompt, CC_STATIC_SYSTEM_PROMPT, {
3502
+ timeout: 900000, label: 'command-center', model: streamModel, maxTurns: ccMaxTurns,
3503
+ allowedTools: 'Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch',
3504
+ effort: streamEffort, direct: true,
3505
+ onChunk: (text) => {
3506
+ const actIdx = text.indexOf('===ACTIONS===');
3507
+ const display = actIdx >= 0 ? text.slice(0, actIdx).trim() : text;
3508
+ try { res.write('data: ' + JSON.stringify({ type: 'chunk', text: display }) + '\n\n'); } catch {}
3509
+ },
3510
+ onToolUse: (name, input) => {
3511
+ try { res.write('data: ' + JSON.stringify({ type: 'tool', name, input: typeof input === 'string' ? input.slice(0, 200) : JSON.stringify(input).slice(0, 200) }) + '\n\n'); } catch {}
3512
+ }
3513
+ });
3514
+ _ccStreamAbort = retryPromise.abort;
3515
+ const retryResult = await retryPromise;
3516
+ trackUsage('command-center', retryResult.usage);
3517
+ if (retryResult.text) {
3518
+ // Fresh session succeeded — use retryResult from here
3519
+ Object.assign(result, retryResult);
3520
+ }
3521
+ }
3496
3522
  if (!result.text) {
3497
3523
  const debugInfo = result.code !== 0 ? `(exit code ${result.code})` : '(empty response)';
3498
3524
  const stderrTail = (result.stderr || '').trim().split('\n').filter(Boolean).slice(-3).join(' | ');
3499
3525
  console.error(`[CC-stream] Failed: code=${result.code}, stderr=${(result.stderr || '').slice(0, 500)}, stdout_tail=${(result.raw || '').slice(-500)}`);
3500
- // If resuming a session failed, auto-reset so next attempt starts fresh
3501
- const retryHint = wasResume && result.code !== 0
3502
- ? 'Session was reset — send your message again to start fresh.'
3503
- : 'Send your message again to retry.';
3504
- // Return null sessionId on resume failure so client clears the stale session
3505
- const errorSessionId = (wasResume && result.code !== 0) ? null : tabSessionId;
3506
- res.write('data: ' + JSON.stringify({ type: 'done', text: `I had trouble processing that ${debugInfo}. ${stderrTail ? 'Detail: ' + stderrTail : ''}\n\n${retryHint}`, actions: [], sessionId: errorSessionId }) + '\n\n');
3526
+ const retryHint = 'Send your message again to retry.';
3527
+ res.write('data: ' + JSON.stringify({ type: 'done', text: `I had trouble processing that ${debugInfo}. ${stderrTail ? 'Detail: ' + stderrTail : ''}\n\n${retryHint}`, actions: [], sessionId: null }) + '\n\n');
3507
3528
  _ccStreamEnded = true; res.end();
3508
3529
  return;
3509
3530
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.922",
3
+ "version": "0.1.924",
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"