Commit Graph
1 Commits
Author SHA1 Message Date
adm 6898cdf113 agent: loop-repetition guard, earlier notepad warn, tighter silence watchdog
Feedback from the framework agent (agent-feedback/2026-11-30-proposte.md),
evaluated against the real code; outcome in agent-feedback/2026-11-30-esito.md.

- agent/mod.rs: detect REPEAT_LIMIT=3 consecutive identical tool-call batches and
  stop with agent_loop_detected before burning MAX_ITERS; the repeating request
  is dropped before persistence so no dangling tool_call turn is left. New test
  loop_detects_repeated_tool_calls; step-limit test now varies its commands.
- notepad: SOFT_WARN_CHARS 6000 -> 4000 (warn at half the ceiling; consolidation
  itself costs an extra model turn).
- config/supervisor: silence watchdog default 600s -> 120s (already configurable
  via silence_timeout_secs); a long output gap is almost always a hang.

Rejected: bash -lc -> bash -c (the login shell preserves the user environment).
Deferred: token-based window cut (heavy; KV-cache interaction; to design with the
new engine). Suite: 204 passed / 3 ignored, clippy/fmt clean.
2026-11-30 02:30:00 +01:00