diff --git a/crates/tui/src/tools/subagent/mod.rs b/crates/tui/src/tools/subagent/mod.rs index 357aeec4..cf10a930 100644 --- a/crates/tui/src/tools/subagent/mod.rs +++ b/crates/tui/src/tools/subagent/mod.rs @@ -4988,7 +4988,9 @@ const SUBAGENT_OUTPUT_FORMAT: &str = include_str!("../../prompts/subagent_output const GENERAL_AGENT_INTRO: &str = concat!( "You are a general-purpose sub-agent spawned to handle a specific task autonomously.\n", "Stay inside the assigned scope; put adjacent work under RISKS/BLOCKERS.\n", - "Plan multi-step work with `checklist_write`; add `update_plan` for complex strategy.\n\n" + "Plan multi-step work with `checklist_write`; add `update_plan` for complex strategy.\n", + "**Stop quickly on failure**: if the same tool call fails 2 times in a row, stop retrying and return what you have so far with a one-line note explaining what's missing. Do not loop on impossible queries (e.g. external API unreachable, rate-limited, or returning empty).\n", + "**Bounded effort**: prefer one focused attempt over many speculative retries. If you cannot complete the task with available data within 3-5 tool calls, return your current partial findings — the parent agent can compensate with its own knowledge.\n\n" ); const EXPLORE_AGENT_INTRO: &str = concat!(