fix(runner): raise SUB_MAX_TURNS to 40 and inject Surgical Healing Protocol into subtasks
This commit is contained in:
19
vibn-agent-runner/dist/agent-session-runner.js
vendored
19
vibn-agent-runner/dist/agent-session-runner.js
vendored
@@ -294,7 +294,7 @@ File: "${path.relative(opts.repoRoot ?? ctx.workspaceRoot, task.filePath)}" (lin
|
|||||||
const userPrompt = `Please implement the following task: "${task.text}" and then check it off in the task list.`;
|
const userPrompt = `Please implement the following task: "${task.text}" and then check it off in the task list.`;
|
||||||
const history = [{ role: "user", content: userPrompt }];
|
const history = [{ role: "user", content: userPrompt }];
|
||||||
let subTurn = 0;
|
let subTurn = 0;
|
||||||
const SUB_MAX_TURNS = 18;
|
const SUB_MAX_TURNS = 40;
|
||||||
let toolCallsSinceText = 0;
|
let toolCallsSinceText = 0;
|
||||||
let roundsSinceText = 0;
|
let roundsSinceText = 0;
|
||||||
const toolFingerprints = [];
|
const toolFingerprints = [];
|
||||||
@@ -388,11 +388,24 @@ File: "${path.relative(opts.repoRoot ?? ctx.workspaceRoot, task.filePath)}" (lin
|
|||||||
history.push({
|
history.push({
|
||||||
role: "user",
|
role: "user",
|
||||||
content: `Your previous edits completed, but the project's build check failed with compilation errors.
|
content: `Your previous edits completed, but the project's build check failed with compilation errors.
|
||||||
Please fix these errors immediately so the build compiles clean:
|
|
||||||
|
|
||||||
|
=========================================
|
||||||
|
🚨 SURGICAL HEALING PROTOCOL ACTIVE 🚨
|
||||||
|
=========================================
|
||||||
|
The project's compilation/build has failed. You are currently in an autonomous, auto-correcting healing loop and must fix this compilation error immediately.
|
||||||
|
|
||||||
|
To prevent cognitive loop spirals and command limits, you MUST follow this strict, non-negotiable troubleshooting protocol:
|
||||||
|
|
||||||
|
1. 🚫 STRICTLY BLOCK EXPLORATION: DO NOT execute general directory exploration or orientation commands such as 'ls', 'find', 'pwd', 'grep', 'git status', 'git diff', or other search commands. You do not need to look around.
|
||||||
|
2. 🎯 SURGICAL TARGETING: Scan the compiler error logs below to locate the EXACT filename, line number, and column where the compilation failed.
|
||||||
|
3. 🛠️ IMMEDIATE CORRECTION: Read that file immediately using your specific file-reading tool (using precise start/end lines if it is large) and apply a targeted, surgical edit to correct the exact syntax or type error. Do not write a placeholder or partial fix.
|
||||||
|
|
||||||
|
Here are the precise compilation errors from the compiler:
|
||||||
\`\`\`text
|
\`\`\`text
|
||||||
${verification.error}
|
${verification.error}
|
||||||
\`\`\``,
|
\`\`\`
|
||||||
|
|
||||||
|
Implement the exact fix directly in the code now.`,
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ File: "${path.relative(opts.repoRoot ?? ctx.workspaceRoot, task.filePath)}" (lin
|
|||||||
const history: ChatMessage[] = [{ role: "user", content: userPrompt }];
|
const history: ChatMessage[] = [{ role: "user", content: userPrompt }];
|
||||||
|
|
||||||
let subTurn = 0;
|
let subTurn = 0;
|
||||||
const SUB_MAX_TURNS = 18;
|
const SUB_MAX_TURNS = 40;
|
||||||
let toolCallsSinceText = 0;
|
let toolCallsSinceText = 0;
|
||||||
let roundsSinceText = 0;
|
let roundsSinceText = 0;
|
||||||
const toolFingerprints: string[] = [];
|
const toolFingerprints: string[] = [];
|
||||||
@@ -503,11 +503,24 @@ File: "${path.relative(opts.repoRoot ?? ctx.workspaceRoot, task.filePath)}" (lin
|
|||||||
history.push({
|
history.push({
|
||||||
role: "user",
|
role: "user",
|
||||||
content: `Your previous edits completed, but the project's build check failed with compilation errors.
|
content: `Your previous edits completed, but the project's build check failed with compilation errors.
|
||||||
Please fix these errors immediately so the build compiles clean:
|
|
||||||
|
|
||||||
|
=========================================
|
||||||
|
🚨 SURGICAL HEALING PROTOCOL ACTIVE 🚨
|
||||||
|
=========================================
|
||||||
|
The project's compilation/build has failed. You are currently in an autonomous, auto-correcting healing loop and must fix this compilation error immediately.
|
||||||
|
|
||||||
|
To prevent cognitive loop spirals and command limits, you MUST follow this strict, non-negotiable troubleshooting protocol:
|
||||||
|
|
||||||
|
1. 🚫 STRICTLY BLOCK EXPLORATION: DO NOT execute general directory exploration or orientation commands such as 'ls', 'find', 'pwd', 'grep', 'git status', 'git diff', or other search commands. You do not need to look around.
|
||||||
|
2. 🎯 SURGICAL TARGETING: Scan the compiler error logs below to locate the EXACT filename, line number, and column where the compilation failed.
|
||||||
|
3. 🛠️ IMMEDIATE CORRECTION: Read that file immediately using your specific file-reading tool (using precise start/end lines if it is large) and apply a targeted, surgical edit to correct the exact syntax or type error. Do not write a placeholder or partial fix.
|
||||||
|
|
||||||
|
Here are the precise compilation errors from the compiler:
|
||||||
\`\`\`text
|
\`\`\`text
|
||||||
${verification.error}
|
${verification.error}
|
||||||
\`\`\``,
|
\`\`\`
|
||||||
|
|
||||||
|
Implement the exact fix directly in the code now.`,
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user