next-issue 14.4.13 → 14.4.14

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.
@@ -7,6 +7,7 @@ export async function runIssues(loop, seen = new Set()) {
7
7
  let error;
8
8
  let crash;
9
9
  let claiming = true;
10
+ let stopped = false;
10
11
  let unclaimed = true;
11
12
  let recount = false;
12
13
  const ended = new AbortController();
@@ -14,6 +15,11 @@ export async function runIssues(loop, seen = new Set()) {
14
15
  const tried = { ended: new Set(), labels: new Map(), blocked: new Set() };
15
16
  try {
16
17
  for (;;) {
18
+ if (stopped && !loop.stop()) {
19
+ stopped = false;
20
+ stoppedAt = undefined;
21
+ claiming = true;
22
+ }
17
23
  if (claiming && (recount || (unclaimed && slots.open()))) {
18
24
  recount = false;
19
25
  refresh = refreshes(loop, ended.signal, refresh);
@@ -45,6 +51,7 @@ export async function runIssues(loop, seen = new Set()) {
45
51
  if (report === undefined) {
46
52
  crash ??= { failure };
47
53
  claiming = false;
54
+ stopped = false;
48
55
  continue;
49
56
  }
50
57
  reports.push(report);
@@ -60,6 +67,10 @@ export async function runIssues(loop, seen = new Set()) {
60
67
  if (claiming && (loop.stop() || report.halt === true)) {
61
68
  stoppedAt = issue;
62
69
  claiming = false;
70
+ stopped = true;
71
+ }
72
+ if (report.halt === true) {
73
+ stopped = false;
63
74
  }
64
75
  if (report.outcome === 'done' && !claiming) {
65
76
  await loop.issues().catch(() => undefined);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "14.4.13",
3
+ "version": "14.4.14",
4
4
  "description": "Autonomous issue harness driven by the Claude Agent SDK",
5
5
  "keywords": [
6
6
  "github",