-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Problem
Agent loop only supports text-based tool extraction. Need to branch based on provider capability.
Solution
In process_response():
- If provider.supports_tool_use(): use chat_with_tools(), handle ChatResponse::ToolUse
- Else: use existing text extraction path (bash blocks)
- Tool execution reuses same ToolExecutor pipeline
- ToolResult fed back as ToolResult MessagePart
Acceptance Criteria
- Agent detects provider tool_use support
- Native path: structured tool calls → execute → tool result → next iteration
- Text path: unchanged behavior
- Both paths respect PermissionPolicy
- Both paths respect max_tool_iterations and doom-loop detection
Part of #253 (M20)
Reactions are currently unavailable