Skip to content

Commit 91e8703

Browse files
stephanjclaude
andcommitted
feat: raise agent max tool-calls cap to 500, default to 50 (#1163)
On large codebases the agent's discovery and implementation phases routinely exceeded the previous spinner cap of 100 tool calls, interrupting work mid-task. Raise the selectable upper bound to 500 and bump the default from 25 to 50 for a better out-of-box experience. The limit remains a soft stop: AgentLoopTracker returns a "provide your best answer" message to the LLM rather than hard-killing the run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 22df035 commit 91e8703

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)