fix(runner): completely remove destructive git clean -fd rollback block

This commit is contained in:
2026-06-03 15:02:43 -07:00
parent f0ea84fbd4
commit 3c0d3d5175
2 changed files with 2 additions and 22 deletions

View File

@@ -619,18 +619,8 @@ async function runSessionAgent(config, task, ctx, opts) {
await emit({
ts: now(),
type: "error",
text: `❌ [Orchestrator] Bailed out! Task execution failed on: "${currentTask.text}". Rolling back modifications for this task to keep the repository green...`,
text: `❌ [Orchestrator] Bailed out! Task execution failed on: "${currentTask.text}".`,
});
try {
const { execSync } = require("child_process");
execSync("git checkout -- . && git clean -fd", {
cwd: repoRoot,
stdio: "pipe",
});
}
catch (rollbackErr) {
console.error("Rollback failed:", rollbackErr.message || rollbackErr);
}
await patchSession(opts, {
status: "failed",
error: `Delegation loop halted at task: "${currentTask.text}"`,

View File

@@ -770,19 +770,9 @@ export async function runSessionAgent(
await emit({
ts: now(),
type: "error",
text: `❌ [Orchestrator] Bailed out! Task execution failed on: "${currentTask.text}". Rolling back modifications for this task to keep the repository green...`,
text: `❌ [Orchestrator] Bailed out! Task execution failed on: "${currentTask.text}".`,
});
try {
const { execSync } = require("child_process");
execSync("git checkout -- . && git clean -fd", {
cwd: repoRoot,
stdio: "pipe",
});
} catch (rollbackErr: any) {
console.error("Rollback failed:", rollbackErr.message || rollbackErr);
}
await patchSession(opts, {
status: "failed",
error: `Delegation loop halted at task: "${currentTask.text}"`,