After dispatchDoctorHeal fires pi.sendMessage({ triggerTurn: true }),
the function fell through to return "continue". The auto-loop treated
"continue" as "proceed to next unit", called newSession() while the
session manager was still processing the heal turn, and the 30s timeout
killed auto-mode.
Returning "dispatched" causes the auto-loop to break, letting the heal
turn complete and trigger its own handleAgentEnd to resume the loop.
Closes #1580
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
43d8dbc9d3
commit
fc4cb836fe
1 changed files with 1 additions and 0 deletions
|
|
@ -194,6 +194,7 @@ export async function postUnitPreVerification(pctx: PostUnitContext, opts?: PreV
|
|||
const reportText = formatDoctorReport(report, { scope: doctorScope, includeWarnings: true });
|
||||
const structuredIssues = formatDoctorIssuesForPrompt(actionable);
|
||||
dispatchDoctorHeal(pi, doctorScope, reportText, structuredIssues);
|
||||
return "dispatched";
|
||||
} catch (e) {
|
||||
debugLog("postUnit", { phase: "doctor-heal-dispatch", error: String(e) });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue