feat(agent-platform): enable identical tool-call guard by default for all flows
Summary
Change the default of identical_tool_call_limit from 0 (off) to 3 in AgentComponentBase. Every flow then gets the guard, and we stop having to enable it one flow at a time.
Follow-up to #2735 (thread) and #2616 (closed).
Background
!6671 (merged) added the guard in a disabled state. !7002 (merged) then turned it on for developer/3.0.0 only. The first production read showed:
developer/3.0.0: loops dropped from 11 in 1,771 sessions (0.62%) to 0 in 2,311. The longest streak has stayed at the cap of 2 every day since rollout.- Flows and versions without the guard still loop.
developer/2.0.0-interactivehit a 340-call streak andai_catalog_agenthit 476–507.
The team agreed to make this the default (@bastirehm, @aying-gl, @james.casey).
Proposal
- Set
identical_tool_call_limit: int = 3induo_workflow_service/agent_platform/v1/components/agent/component.py. This coversAgentComponent,SupervisorAgentComponentandSupervisorAgentComponentV2. - Remove the explicit
identical_tool_call_limit: 3fromdeveloper/3.0.0.yml, since it becomes redundant. - Update the
identical_tool_call_limitentry indocs/flow_registry/v1.mdwith the new default. Flows can still opt out with0. - Update the unit tests that check the default is
0.
Considerations
- v1 stability: this changes runtime behaviour for every existing and custom (AI Catalog) flow that doesn't set the field. The config stays backwards compatible, but this should be checked against
docs/flow_registry/contribution_guidelines.md. - Polling false positives: the guard only trips when the call and its result are identical, so legitimate polling isn't affected.
- Telemetry: the follow-up from !6671 (merged) to emit an internal event when the guard trips would let us measure trip rate across all flows, not just infer it from the cap.
Validation
- Loop rate (
duo_workflow_tool_loop_session_summary) drops to about 0% and the longest streak stays at 2 or below across all flows, especiallydeveloper/2.0.0*,ai_catalog_agentandresolve_sast_vulnerability. - No drop in success rate for flows that previously had the guard off.