Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

v2.5.0 batch 5: codex iteration cap bump (uselu live-test fix)

purplee5ac718ab56e
diff --git a/src/hooks/useCodex.ts b/src/hooks/useCodex.ts
index d2926924..181284bf 100644
--- a/src/hooks/useCodex.ts
+++ b/src/hooks/useCodex.ts
@@ -241,8 +241,12 @@ export function useCodex() {
// AgentBudget also tracks tool calls and the iteration cap pulled
// from settings. The legacy for-loop cap stays as the outer guard.
const budget = budgetFromSettings({
- agentMaxToolCalls: settings.agentMaxToolCalls ?? 50,
- agentMaxIterations: settings.agentMaxIterations ?? 25,
+ // v2.5.0 (uselu live-test 1af958b2) — defaults bumped to 400 / 200.
+ // A real scaffold-install-fix-verify loop with a 35B local model
+ // fired the 50/25 cap while the model still had useful tool calls
+ // queued. Wall-clock still bounded by the AgentBudget timeouts.
+ agentMaxToolCalls: settings.agentMaxToolCalls ?? 400,
+ agentMaxIterations: settings.agentMaxIterations ?? 200,
})
try {
@@ -264,8 +268,11 @@ export function useCodex() {
let echoRetriesRemaining = 3
// Raised from 20 → 50 (v2.3.7): large refactors across 10+ files
// legitimately need >20 tool calls. Budget still caps via
- // agentMaxToolCalls/agentMaxIterations (defaults 50/25 from settings).
- const MAX_CODEX_ITERATIONS = 50
+ // agentMaxToolCalls/agentMaxIterations.
+ // Raised again 50 → 200 (v2.5.0 — uselu live-test 1af958b2):
+ // scaffold-install-fix-verify on 35B local model legitimately
+ // needs 100+ iterations across multi-file refactors.
+ const MAX_CODEX_ITERATIONS = 200
for (let i = 0; i < MAX_CODEX_ITERATIONS && runningRef.current && !abort.signal.aborted; i++) {
budget.addIteration()
const bx = budget.exceeded()
diff --git a/src/lib/constants.ts b/src/lib/constants.ts
index 9e2921d1..60105621 100644
--- a/src/lib/constants.ts
+++ b/src/lib/constants.ts
@@ -23,9 +23,14 @@ export const DEFAULT_SETTINGS: Settings = {
claudeCodeModel: '',
claudeCodeAutoApprove: false,
claudeCodePath: '',
- // Agent budget (Phase 10 v2.4.0)
- agentMaxToolCalls: 50,
- agentMaxIterations: 25,
+ // Agent budget — bumped in v2.5.0 (uselu live-test 2026-05-25, commit
+ // 1af958b2): on a real scaffold-install-fix-verify loop with a 35B
+ // local model, 25 iterations / 50 tool calls fired the cap while the
+ // model still had useful work to do. 200 / 400 is roomy enough for
+ // multi-file refactors yet still bounded enough that a runaway loop
+ // surfaces in finite wall-clock.
+ agentMaxToolCalls: 400,
+ agentMaxIterations: 200,
hfDownloadPathOverride: '',
// Generation timeouts (Bug P v2.4.7)
imageGenTimeoutMinutes: 20,