You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a 30-iteration budget, the ReactAgent cannot complete tasks that require creating multiple files. Each file creation + lint-fix cycle takes 3-5 iterations, and the agent spends ~9 iterations on exploration (see #373). This leaves budget for only 4-7 files.
Adaptive iteration budget — scale budget based on task complexity (number of files expected, dependency count)
Ruff auto-fix integration — run ruff check --fix automatically before the lint gate, reducing fix iterations from 3-5 to 1
Agent completion signal — let the agent end early when it determines the task is done (stop_reason check)
Impact
After fixing #372 (gate resilience) and #373 (exploration waste), the effective iteration budget would be ~25 iterations for implementation. With ruff auto-fix, each file would take ~2 iterations. This would allow 10-12 files per task — sufficient for most tasks.
Files
codeframe/core/react_agent.py — _react_loop() iteration limit, _build_system_prompt() for context pre-loading
Problem
With a 30-iteration budget, the ReactAgent cannot complete tasks that require creating multiple files. Each file creation + lint-fix cycle takes 3-5 iterations, and the agent spends ~9 iterations on exploration (see #373). This leaves budget for only 4-7 files.
Observed Behavior
Task "Design Data Model for Tasks" on cf-test:
models.py→ PASSEDstorage.py→ PASSED__init__.py→ PASSEDtest_models.py→ FAILED (only 2 iterations left to fix)The agent generated working, lint-clean code for 3 files but ran out of budget before completing the task.
Contributing Factors
Proposed Fixes
Several complementary approaches:
ruff check --fixautomatically before the lint gate, reducing fix iterations from 3-5 to 1Impact
After fixing #372 (gate resilience) and #373 (exploration waste), the effective iteration budget would be ~25 iterations for implementation. With ruff auto-fix, each file would take ~2 iterations. This would allow 10-12 files per task — sufficient for most tasks.
Files
codeframe/core/react_agent.py—_react_loop()iteration limit,_build_system_prompt()for context pre-loadingcodeframe/core/gates.py— potential ruff auto-fix integration