fix delegate timeout (#284)
* pin all CLI installations to explicit versions and use pro models by default - codex: pin @openai/codex to 0.101.0 (was "latest") - opencode: pin opencode-ai to 1.1.56 (was "latest") - gemini: pin gemini-cli to v0.28.2 via new tag param on installFromGithub - cursor: pin to 2026.01.28-fd13201 via direct tarball download (replaces curl install script) - add installFromDirectTarball to install.ts for versioned tarball URLs - gemini auto effort now uses pro-preview instead of flash-preview - test runner model overrides updated to use pro-preview consistently Co-authored-by: Cursor <cursoragent@cursor.com> * increase activity timeout * fix delegation timeout * fix delegate timeouts --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
pullfrog[bot]
parent
ceadb3120a
commit
a8dde34531
@@ -141921,6 +141921,7 @@ function DelegateTool(ctx) {
|
||||
log.info(
|
||||
`\xBB delegating to ${selectedMode.name} mode (effort=${effort})${params.instructions ? " with orchestrator instructions" : ""}`
|
||||
);
|
||||
const keepAliveInterval = setInterval(markActivity, 3e4);
|
||||
try {
|
||||
const subagentPayload = { ...ctx.payload, effort };
|
||||
const subagentInstructions = resolveSubagentInstructions({
|
||||
@@ -141954,6 +141955,7 @@ function DelegateTool(ctx) {
|
||||
error: errorMessage
|
||||
};
|
||||
} finally {
|
||||
clearInterval(keepAliveInterval);
|
||||
ctx.toolState.delegationActive = false;
|
||||
}
|
||||
})
|
||||
@@ -144858,6 +144860,7 @@ var claude = agent({
|
||||
// disabled: process-level timeout in main.ts handles this (subprocess timeout would kill orchestrator during delegation)
|
||||
onStdout: async (chunk) => {
|
||||
finalOutput2 += chunk;
|
||||
markActivity();
|
||||
stdoutBuffer += chunk;
|
||||
const lines = stdoutBuffer.split("\n");
|
||||
stdoutBuffer = lines.pop() || "";
|
||||
@@ -145140,6 +145143,7 @@ var codex = agent({
|
||||
// disabled: process-level timeout in main.ts handles this (subprocess timeout would kill orchestrator during delegation)
|
||||
onStdout: async (chunk) => {
|
||||
finalOutput2 += chunk;
|
||||
markActivity();
|
||||
stdoutBuffer += chunk;
|
||||
const lines = stdoutBuffer.split("\n");
|
||||
stdoutBuffer = lines.pop() || "";
|
||||
@@ -145412,24 +145416,32 @@ var cursor = agent({
|
||||
});
|
||||
let stdout = "";
|
||||
let stderr = "";
|
||||
let stdoutBuffer = "";
|
||||
child.on("spawn", () => {
|
||||
log.debug("Cursor CLI process spawned");
|
||||
});
|
||||
child.stdout?.on("data", async (data) => {
|
||||
const text = data.toString();
|
||||
stdout += text;
|
||||
try {
|
||||
const event = JSON.parse(text);
|
||||
markActivity();
|
||||
log.debug(JSON.stringify(event, null, 2));
|
||||
if (event.type === "thinking" && event.subtype === "delta" && !event.text) {
|
||||
return;
|
||||
markActivity();
|
||||
stdoutBuffer += text;
|
||||
const lines = stdoutBuffer.split("\n");
|
||||
stdoutBuffer = lines.pop() || "";
|
||||
for (const line of lines) {
|
||||
const trimmed = line.trim();
|
||||
if (!trimmed) continue;
|
||||
try {
|
||||
const event = JSON.parse(trimmed);
|
||||
log.debug(JSON.stringify(event, null, 2));
|
||||
if (event.type === "thinking" && event.subtype === "delta" && !event.text) {
|
||||
continue;
|
||||
}
|
||||
const handler2 = messageHandlers5[event.type];
|
||||
if (handler2) {
|
||||
await handler2(event);
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
const handler2 = messageHandlers5[event.type];
|
||||
if (handler2) {
|
||||
await handler2(event);
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
});
|
||||
child.stderr?.on("data", (data) => {
|
||||
@@ -145660,6 +145672,7 @@ var gemini = agent({
|
||||
onStdout: async (chunk) => {
|
||||
const text = chunk.toString();
|
||||
finalOutput2 += text;
|
||||
markActivity();
|
||||
stdoutBuffer += text;
|
||||
const lines = stdoutBuffer.split("\n");
|
||||
stdoutBuffer = lines.pop() || "";
|
||||
@@ -145863,6 +145876,7 @@ var opencode = agent({
|
||||
onStdout: async (chunk) => {
|
||||
const text = chunk.toString();
|
||||
output += text;
|
||||
markActivity();
|
||||
stdoutBuffer += text;
|
||||
const lines = stdoutBuffer.split("\n");
|
||||
stdoutBuffer = lines.pop() || "";
|
||||
|
||||
Reference in New Issue
Block a user