compact-agent 1.33.7 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3577,6 +3577,33 @@ async function main() {
3577
3577
  process.stderr.write('[compact-agent] non-interactive mode requires --prompt <text> or --prompt-file <path>.\n');
3578
3578
  process.exit(2);
3579
3579
  }
3580
+ // ── F9: Empty-engagement guard (non-interactive nudge) ──
3581
+ //
3582
+ // Some failures in the 2026-05-25 baseline run came from the
3583
+ // model emitting a single no-tool-call response and exiting —
3584
+ // never actually attempting the work. polyglot-c-py, solana-data,
3585
+ // and vim-terminal-task all showed this pattern. The model
3586
+ // interpreted some aspect of the spec as "I can't do this" (e.g.
3587
+ // "use vim" suggesting interactive editing) and bailed.
3588
+ //
3589
+ // In non-interactive mode there's no human to push back, so we
3590
+ // prepend a system message that explicitly frames the contract:
3591
+ // the agent must DO the work, with tools. Responses without tool
3592
+ // calls are interpreted as "I'm done" — and F5+ DeCRIM will
3593
+ // then walk the agent through verification.
3594
+ //
3595
+ // This is system-prompt-level and doesn't repeat per-turn (that
3596
+ // would bloat context). It's a one-shot priming injection.
3597
+ messages.push({
3598
+ role: 'system',
3599
+ content: 'You are running in NON-INTERACTIVE mode: no human will answer follow-up questions. ' +
3600
+ 'You must DO the work using the available tools (bash, write, edit, read, glob, grep, etc.) — ' +
3601
+ 'not describe what would need to be done. ' +
3602
+ 'If the task mentions a specific tool you do not have direct access to (e.g. "use vim"), ' +
3603
+ 'achieve the equivalent effect with the tools you do have. ' +
3604
+ 'If you lack information, USE A TOOL to investigate; do not ask the user. ' +
3605
+ 'A response with no tool calls is interpreted as "I am done" and triggers final verification.',
3606
+ });
3580
3607
  messages.push({ role: 'user', content: promptText.trim() });
3581
3608
  try {
3582
3609
  await runQuery({