claude-teammate 0.1.230 → 0.1.232

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-teammate",
3
- "version": "0.1.230",
3
+ "version": "0.1.232",
4
4
  "description": "CLI bootstrapper for Claude Teammate.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -66,11 +66,15 @@ export function createDraftPullRequestPoller({
66
66
  if (stuckAt && (Date.now() - stuckAt.getTime() >= stuckPrRetryIntervalMs)) {
67
67
  return true;
68
68
  }
69
- await logger.info("Draft PR is stuck but retry window has not elapsed, not queueing for work", {
70
- pr: pullRequest.number,
71
- repo: pullRequest.repoUrl
72
- });
73
- return false;
69
+ if (stuckAt) {
70
+ await logger.info("Draft PR is stuck but retry window has not elapsed, not queueing for work", {
71
+ pr: pullRequest.number,
72
+ repo: pullRequest.repoUrl
73
+ });
74
+ return false;
75
+ }
76
+ // No STUCK_AT = permanent stuck (e.g. step too large for Claude).
77
+ // Fall through to the human-comment check so "@BOT retry" can unblock it.
74
78
  }
75
79
 
76
80
  const latestComment = getLatestGitHubComment(detail.comments);
@@ -234,7 +234,7 @@ export async function processPullRequestImplementation({
234
234
  void logger.info("Claude PR implementation step started", { repo: repo.url, pr: detail.number, step: stepText, pid: child.pid ?? null });
235
235
  }
236
236
  });
237
- } else if (await branchHasChangesAgainstMain(repoPath)) {
237
+ } else if (await branchHasChangesAgainstMain(repoPath).catch(() => false)) {
238
238
  // Branch already has commits from a previous run that crashed before the
239
239
  // PR body could be updated. Skip Claude to avoid duplicate work; the
240
240
  // commitAndPushRepoChanges call below will detect branchHasImplementation
@@ -142,10 +142,21 @@ export async function processTrackedPullRequest({
142
142
  if (currentStatus === "STUCK") {
143
143
  const stuckAt = getStuckAt(detail.body);
144
144
  const shouldRetry = stuckAt && (Date.now() - stuckAt.getTime() >= stuckPrRetryIntervalMs);
145
- if (shouldRetry) {
145
+ const latestHumanComment = !stuckAt
146
+ ? getLatestGitHubComment(detail.comments.filter((c) => !isForgeBotAuthor(c.author, githubBotUser)))
147
+ : null;
148
+ const humanRetryRequested = latestHumanComment &&
149
+ !hasEyesReaction(latestHumanComment) &&
150
+ !hasPlusOneReaction(latestHumanComment);
151
+ if (shouldRetry || humanRetryRequested) {
146
152
  const resetBody = setPullRequestStatus(detail.body, "INITIALIZING");
147
153
  await github.updatePullRequest(repo.url, detail.number, { title: detail.title, body: resetBody });
148
- await logger.info("Retrying STUCK pull request", { repo: repo.url, pr: detail.number, stuckAt: stuckAt.toISOString() });
154
+ await logger.info("Retrying STUCK pull request", {
155
+ repo: repo.url,
156
+ pr: detail.number,
157
+ reason: shouldRetry ? "retry_window_elapsed" : "human_comment",
158
+ stuckAt: stuckAt?.toISOString() ?? null
159
+ });
149
160
  return processPullRequestImplementation({
150
161
  repo,
151
162
  detail: { ...detail, body: resetBody },