fix: gate main-agent self-stop on auto-next obligation

This commit is contained in:
Eve
2026-04-24 19:34:15 +08:00
parent 1fe6474009
commit a77141f021
3 changed files with 8 additions and 0 deletions

View File

@@ -110,6 +110,8 @@ export function buildContinuityGateBlock(result, options = {}) {
if (result.reason === 'missing_auto_next_dispatch') {
lines.push('- HARD_GATE: Do not stop at this completed-task boundary.');
lines.push(`- HARD_GATE: Auto-dispatch the next task in the same approved plan, unless ${terminalStates.join(', ')}, or high-risk stop applies.`);
lines.push('- HARD_GATE: Do not hand control back to the user with an ordinary progress update while auto-next is still obligatory.');
lines.push('- HARD_GATE: If you cannot prove the next dispatch, convert this into an explicit continuity failure instead of a normal status report.');
} else {
lines.push(`- HARD_GATE: Route back to continuity failure until a real next dispatch receipt exists, unless closure state is ${terminalStates.join(', ')}.`);
}