allowedBehaviorToolNames runs only on non-plan turns because appendDynamicTools returns early for plan mode. Within that boundary, Explore mode wins over the default behavior that allows all tools.
( allTools []fantasy.AgentTool, chatMode database.NullChatMode, )
| 6651 | // appendDynamicTools returns early for plan mode. Within that boundary, |
| 6652 | // Explore mode wins over the default behavior that allows all tools. |
| 6653 | func allowedBehaviorToolNames( |
| 6654 | allTools []fantasy.AgentTool, |
| 6655 | chatMode database.NullChatMode, |
| 6656 | ) []string { |
| 6657 | if isExploreSubagentMode(chatMode) { |
| 6658 | return allowedExploreToolNames(allTools) |
| 6659 | } |
| 6660 | return allToolNames(allTools) |
| 6661 | } |
| 6662 | |
| 6663 | func stopAfterPlanTools( |
| 6664 | planMode database.NullChatPlanMode, |