claude-overnight 1.11.11 → 1.11.12

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/dist/run.js CHANGED
@@ -342,11 +342,16 @@ export async function executeRun(cfg) {
342
342
  lastAborted = swarm.aborted;
343
343
  recordBranches(swarm.agents, swarm.mergeResults, branches);
344
344
  saveWaveSession(runDir, waveNum, swarm.agents, swarm.totalCostUsd);
345
+ // Tasks that never made it into the swarm (queue cleared on abort/cap)
346
+ // are preserved as currentTasks so resume picks them up. Budget for these
347
+ // wasn't decremented (only attempted agents were), so no refund needed.
348
+ const attemptedPrompts = new Set(swarm.agents.map(a => a.task.prompt));
349
+ const neverStarted = currentTasks.filter(t => !attemptedPrompts.has(t.prompt));
345
350
  saveRunState(runDir, {
346
351
  id: `run-${new Date().toISOString().slice(0, 19)}`, objective: objective ?? "", budget: cfg.budget,
347
352
  remaining, workerModel, plannerModel, concurrency, permissionMode,
348
353
  usageCap, allowExtraUsage: cfg.allowExtraUsage, extraUsageBudget: cfg.extraUsageBudget,
349
- flex, useWorktrees, mergeStrategy, waveNum, currentTasks: [],
354
+ flex, useWorktrees, mergeStrategy, waveNum, currentTasks: neverStarted,
350
355
  accCost, accCompleted, accFailed, accIn, accOut, accTools,
351
356
  branches, phase: "steering", startedAt: new Date(cfg.runStartedAt).toISOString(), cwd,
352
357
  });
package/dist/swarm.js CHANGED
@@ -333,6 +333,10 @@ export class Swarm {
333
333
  this.activeQueries.delete(agentQuery);
334
334
  if (sessionId)
335
335
  resumeSessionId = sessionId;
336
+ try {
337
+ agentQuery.close();
338
+ }
339
+ catch { }
336
340
  }
337
341
  };
338
342
  try {
@@ -361,7 +365,7 @@ export class Swarm {
361
365
  const duration = agent.finishedAt - (agent.startedAt || agent.finishedAt);
362
366
  if (agent.toolCalls === 0 && (agent.costUsd ?? 0) < 0.001 && duration < 15_000) {
363
367
  agent.status = "error";
364
- agent.error = "Agent did no work (likely rate-limited before starting)";
368
+ agent.error = "Agent did no work exited without tool use";
365
369
  this.failed++;
366
370
  }
367
371
  else {
@@ -410,7 +414,8 @@ export class Swarm {
410
414
  const dur = (agent.finishedAt ?? Date.now()) - (agent.startedAt ?? Date.now());
411
415
  const m = Math.floor(dur / 60000);
412
416
  const s = Math.round((dur % 60000) / 1000);
413
- return `Agent ${agent.id} done: ${m}m ${s}s, ${agent.toolCalls} tools, ${agent.filesChanged ?? 0} files changed`;
417
+ const verb = agent.status === "error" ? "errored" : "done";
418
+ return `Agent ${agent.id} ${verb}: ${m}m ${s}s, ${agent.toolCalls} tools, ${agent.filesChanged ?? 0} files changed`;
414
419
  }
415
420
  // ── Message handler ──
416
421
  handleMsg(agent, msg) {
@@ -495,6 +500,12 @@ export class Swarm {
495
500
  const pct = info.utilization != null ? `${Math.round(info.utilization * 100)}%` : "";
496
501
  const overageTag = this.isUsingOverage ? " [EXTRA]" : "";
497
502
  this.log(agent.id, `Rate: ${info.status} ${pct}${overageTag}${windowType ? ` (${windowType})` : ""}`);
503
+ if (info.status === "rejected") {
504
+ if (!this.rateLimitResetsAt || this.rateLimitResetsAt <= Date.now()) {
505
+ this.rateLimitResetsAt = Date.now() + 60_000;
506
+ }
507
+ throw new Error("rate limit rejected — retrying");
508
+ }
498
509
  break;
499
510
  }
500
511
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-overnight",
3
- "version": "1.11.11",
3
+ "version": "1.11.12",
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": {