aKode: robustezza dell'agente (punto 4, blocco B)

- Compattazione: prima del riassunto l'output degli strumenti più vecchi
  (tutti tranne gli ultimi 3, sopra i 400 caratteri) diventa un segnaposto
  breve; le chiamate restano. La compattazione usa sempre il provider
  configurato: verificato, con un test sulle capacità dei provider.
- Protezione dai loop in stile Gemini CLI, accanto a max_repeated_failures:
  [agent] max_identical_tool_calls (5 risposte di fila con la stessa chiamata,
  qualunque sia il risultato; esclusi write_stdin e wait_agent; le chiamate
  parallele di una risposta contano una volta) e [agent] max_repeated_text
  (lo stesso testo ripetuto 10 volte di seguito mentre arriva, nella risposta
  o nel ragionamento; esclusi blocchi di codice e separatori).
- Cancellazioni ricorsive protette (rm -r, rm -rf, find -delete): radice,
  home, radice del repository, cartella di lavoro, percorsi fuori da essa o
  calcolati a runtime ($VAR, $(...), xargs) chiedono sempre la conferma
  dell'utente, anche con regole che li permetterebbero; in accesso completo
  vengono rifiutati.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-16 17:59:19 +01:00
parent 4e1f551b84
commit 0460c74f38
15 changed files with 1014 additions and 8 deletions

View File

@@ -795,6 +795,13 @@ pub struct AgentToml {
/// the tests") without calling any tool, send it one short reminder and let it continue,
/// at most this many times per turn. Default: 1. `0` disables the reminder.
pub announce_nudges: Option<u32>,
/// Stop the turn when the model calls the same tool with the same arguments this many
/// times in a row, whatever the result (polling tools such as `write_stdin` excluded).
/// Default: 5. `0` disables the check.
pub max_identical_tool_calls: Option<u32>,
/// Stop the answer while it streams when the same piece of text repeats this many times
/// back to back (code blocks excluded). Default: 10. `0` disables the check.
pub max_repeated_text: Option<u32>,
}
/// `[memoria]` table: session-start briefing and session delivery of the imeAI `memoria` plugin.