claude-overnight 1.2.1 → 1.2.2

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/README.md CHANGED
@@ -225,6 +225,7 @@ The usage bar cycles through all rate limit windows (5h, 7d, etc.) every 3 secon
225
225
 
226
226
  Built for unattended runs lasting hours or days.
227
227
 
228
+ - **Smooth overage transition**: when extra usage is allowed, plan limit rejection is seamless — no dispatch blocking, agents continue into overage
228
229
  - **Hard block**: pauses until the rate limit window resets, then resumes
229
230
  - **Soft throttle**: slows dispatch at >75% utilization
230
231
  - **Extra usage guard**: detects overage billing and stops unless explicitly allowed
package/dist/swarm.js CHANGED
@@ -659,9 +659,14 @@ export class Swarm {
659
659
  const info = rl.rate_limit_info;
660
660
  this.rateLimitUtilization = info.utilization ?? 0;
661
661
  this.rateLimitStatus = info.status;
662
- if (info.status === "rejected" && info.resetsAt) {
662
+ if (info.status === "rejected" && info.resetsAt && !this.allowExtraUsage) {
663
+ // Only block dispatch on rejection if extra usage is NOT allowed.
664
+ // When extra usage is allowed, rejection is just the plan→overage transition.
663
665
  this.rateLimitResetsAt = info.resetsAt;
664
666
  }
667
+ else if (info.status !== "rejected") {
668
+ this.rateLimitResetsAt = undefined;
669
+ }
665
670
  // Track per-window state
666
671
  const windowType = info.rateLimitType;
667
672
  if (windowType) {
@@ -684,7 +689,10 @@ export class Swarm {
684
689
  }
685
690
  const pct = info.utilization != null ? `${Math.round(info.utilization * 100)}%` : "";
686
691
  const overageTag = this.isUsingOverage ? " [EXTRA]" : "";
687
- this.log(agent.id, `Rate: ${info.status} ${pct}${overageTag}${windowType ? ` (${windowType})` : ""}`);
692
+ const statusLabel = info.status === "rejected" && this.allowExtraUsage
693
+ ? "switching to extra usage"
694
+ : info.status;
695
+ this.log(agent.id, `Rate: ${statusLabel} ${pct}${overageTag}${windowType ? ` (${windowType})` : ""}`);
688
696
  break;
689
697
  }
690
698
  }
package/dist/ui.js CHANGED
@@ -75,14 +75,18 @@ export function renderFrame(swarm, showHotkeys = false) {
75
75
  label = chalk.yellow(`Capped at ${capFrac != null ? Math.round(capFrac * 100) : 100}% — finishing active`);
76
76
  }
77
77
  }
78
- else if (swarm.rateLimitResetsAt) {
79
- const waitSec = Math.max(0, Math.ceil((swarm.rateLimitResetsAt - Date.now()) / 1000));
78
+ else if (swarm.rateLimitResetsAt && swarm.rateLimitResetsAt > Date.now()) {
79
+ const waitSec = Math.ceil((swarm.rateLimitResetsAt - Date.now()) / 1000);
80
80
  const mm = Math.floor(waitSec / 60);
81
81
  const ss = waitSec % 60;
82
82
  label = chalk.red(`Waiting for reset ${mm > 0 ? `${mm}m ${ss}s` : `${ss}s`}`);
83
83
  }
84
- if (swarm.isUsingOverage && !swarm.cappedOut)
85
- label += chalk.red(" [EXTRA USAGE]");
84
+ if (swarm.isUsingOverage && !swarm.cappedOut) {
85
+ const budgetInfo = swarm.extraUsageBudget != null
86
+ ? ` $${swarm.overageCostUsd.toFixed(2)}/$${swarm.extraUsageBudget}`
87
+ : "";
88
+ label += chalk.red(` [EXTRA USAGE${budgetInfo}]`);
89
+ }
86
90
  const prefix = windowLabel ? chalk.dim(windowLabel.padEnd(6)) : chalk.dim("Usage ");
87
91
  out.push(` ${prefix}${barStr} ${label}`);
88
92
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-overnight",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Run 10, 100, or 1000 Claude agents overnight. Parallel autonomous AI coding with thinking waves, iterative quality steering, crash recovery, and rate limit handling. Built on the Claude Agent SDK.",
5
5
  "type": "module",
6
6
  "bin": {