0
ReAct-style tool-use scaffold with explicit stop conditions
Design a ReAct-style (reason, act, observe) prompt scaffold for an agent that has access to these tools: tool_list_with_descriptions. The scaffold must:
1. Force an explicit reasoning step before every tool call: what question this call answers and why it's needed now, not just 'call tool X'.
2. Include a hard cap on tool calls per task (max_calls) and require the agent to state, once it's used 70% of its budget, whether it can still complete the task or should report partial progress instead of burning the rest of the budget on a long shot.
3. Define what counts as 'done': the agent must produce a final answer that cites which tool observations it's based on, not a final answer that ignores the tool outputs it gathered.
4. Define the failure behavior when a tool call errors: retry once with a modified input if the error suggests a fixable input problem, otherwise stop and report the error rather than looping.
5. Prevent the agent from calling a tool with the same input twice in a row (a common failure mode of building looping agents).
Output the scaffold as the actual prompt text I'd use, not a description of it.