Skip to content

Commit cce7324

Browse files
authored
Merge pull request #1165 from devoxx/fix/issue-1163-increase-max-tool-calls
Raise agent max tool-calls cap to 500, default to 50 (#1163)
2 parents 22df035 + 91e8703 commit cce7324

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/main/java/com/devoxx/genie/model/Constant.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,14 @@ private Constant() {
6161
public static final Integer MCP_APPROVAL_TIMEOUT = 60;
6262

6363
// Agent mode settings
64-
public static final int AGENT_MAX_TOOL_CALLS = 25;
64+
public static final int AGENT_MAX_TOOL_CALLS = 50;
65+
/**
66+
* Upper bound for the agent max tool-calls spinner (issue #1163). Large codebases
67+
* regularly need more research/implementation iterations than the previous cap of 100
68+
* allowed, which interrupted work mid-task. When this limit is reached the agent is
69+
* asked to wrap up with its best answer rather than being hard-stopped.
70+
*/
71+
public static final int AGENT_MAX_TOOL_CALLS_UPPER_BOUND = 500;
6572
/**
6673
* Wall-clock cap (seconds) for a single MCP/agent prompt conversation.
6774
* Simple (non-agent, non-MCP) prompts use the per-request timeout instead. The agent cap is

src/main/java/com/devoxx/genie/ui/settings/agent/AgentSettingsComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class AgentSettingsComponent extends AbstractSettingsComponent {
3434
private final JBCheckBox enableAgentModeCheckbox =
3535
new JBCheckBox("Enable agent mode", stateService.getAgentModeEnabled());
3636
private final JBIntSpinner maxToolCallsSpinner =
37-
new JBIntSpinner(stateService.getAgentMaxToolCalls() != null ? stateService.getAgentMaxToolCalls() : AGENT_MAX_TOOL_CALLS, 1, 100);
37+
new JBIntSpinner(stateService.getAgentMaxToolCalls() != null ? stateService.getAgentMaxToolCalls() : AGENT_MAX_TOOL_CALLS, 1, AGENT_MAX_TOOL_CALLS_UPPER_BOUND);
3838
private final JBCheckBox autoApproveReadOnlyCheckbox =
3939
new JBCheckBox("Auto-approve read-only tools (read_file, list_files, search_files, fetch_page)", stateService.getAgentAutoApproveReadOnly());
4040
private final JBCheckBox writeApprovalRequiredCheckbox =

0 commit comments

Comments
 (0)