claude-teammate 0.1.319 → 0.1.321
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 +1 -1
- package/src/claude.js +28 -0
- package/src/commands/start.js +1 -1
- package/src/jira.js +1 -1
package/package.json
CHANGED
package/src/claude.js
CHANGED
|
@@ -405,6 +405,22 @@ export function isResumeSessionError(error) {
|
|
|
405
405
|
);
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
// The CLI exhausted its retries trying to coerce the model's final answer into the
|
|
409
|
+
// requested --json-schema (error_max_structured_output_retries). This is transient —
|
|
410
|
+
// usually a long/noisy agent transcript that crowded out a clean final payload — so a
|
|
411
|
+
// single fresh re-run normally succeeds where the first attempt derailed.
|
|
412
|
+
export function isStructuredOutputRetryError(error) {
|
|
413
|
+
if (!error || typeof error !== "object") {
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
const text = `${error.stderr || ""}\n${error.stdout || ""}\n${error.message || ""}`.toLowerCase();
|
|
417
|
+
return (
|
|
418
|
+
text.includes("max_structured_output_retries") ||
|
|
419
|
+
text.includes("error_max_structured_output_retries") ||
|
|
420
|
+
(text.includes("structured output") && text.includes("retr"))
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
|
|
408
424
|
function wrapClaudeCliError(error, timeoutMs) {
|
|
409
425
|
const cliError = new ClaudeCliError(formatClaudeInvocationError(error, timeoutMs));
|
|
410
426
|
if (error?.hitUsageLimit) {
|
|
@@ -490,6 +506,18 @@ async function invokeClaudeTask(schema, systemPrompt, userPrompt, opts = {}) {
|
|
|
490
506
|
} catch (retryError) {
|
|
491
507
|
throw wrapClaudeCliError(retryError, runOpts.timeout);
|
|
492
508
|
}
|
|
509
|
+
} else if (isStructuredOutputRetryError(error)) {
|
|
510
|
+
// Transient: the CLI couldn't coerce the final answer into --json-schema. Retry
|
|
511
|
+
// once from a clean slate instead of hard-failing the whole task.
|
|
512
|
+
void logger?.info?.("Claude structured-output retries exhausted; retrying once from a clean slate", {
|
|
513
|
+
issueKey,
|
|
514
|
+
phase
|
|
515
|
+
});
|
|
516
|
+
try {
|
|
517
|
+
await runOnce(false);
|
|
518
|
+
} catch (retryError) {
|
|
519
|
+
throw wrapClaudeCliError(retryError, runOpts.timeout);
|
|
520
|
+
}
|
|
493
521
|
} else {
|
|
494
522
|
throw wrapClaudeCliError(error, runOpts.timeout);
|
|
495
523
|
}
|
package/src/commands/start.js
CHANGED
|
@@ -17,7 +17,7 @@ import { createJiraClient } from "../jira.js";
|
|
|
17
17
|
import { listKnownRepos } from "../memory.js";
|
|
18
18
|
import { ensureRuntimeDir, isProcessRunning, readPid, removePid } from "../runtime.js";
|
|
19
19
|
|
|
20
|
-
const WORKER_START_TIMEOUT_MS =
|
|
20
|
+
const WORKER_START_TIMEOUT_MS = 165_000;
|
|
21
21
|
const WORKER_START_POLL_INTERVAL_MS = 100;
|
|
22
22
|
|
|
23
23
|
export async function runStartCommand({ projectRoot, entrypointPath, args = [] }) {
|
package/src/jira.js
CHANGED
|
@@ -210,7 +210,7 @@ export function createJiraClient(config) {
|
|
|
210
210
|
|
|
211
211
|
export function buildAssignedIssuesJql(botEmail) {
|
|
212
212
|
const escapedEmail = botEmail.replace(/\\/gu, "\\\\").replace(/"/gu, '\\"');
|
|
213
|
-
return `
|
|
213
|
+
return `updated >= -30d AND assignee = "${escapedEmail}" AND statusCategory != Done ORDER BY updated ASC`;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
export function isBotAuthor(author, botUser, configuredEmail) {
|