Fix max_iterations causing premature failure before Reviewer runs
Browse files- Increase max_iterations from 3 to 10
- The iteration counter was incrementing for every state transition
- With max_iterations=3, workflow failed before Reviewer could run:
EXPLORING(1) → CLARIFYING → PLANNING(2) → CODING(3) → FAILED
Files changed (3)
12345# HuggingFace Spaces Dockerfile for CodePilot# BUILD_VERSION: 13 (v3.3.4 resume-fix - fix tool_use/tool_result bug)FROM python:3.11-slim# Set working directory12345# HuggingFace Spaces Dockerfile for CodePilot# BUILD_VERSION: 14 (v3.3.5 iteration-fix - increase max_iterations)FROM python:3.11-slim# Set working directory
19 unmodified lines202122232425262766 unmodified lines94959697989910019 unmodified lines# ============================================================# STARTUP VERSION CHECK - Change this to detect if rebuild worked# ============================================================APP_VERSION = "3.3.4-resume-fix"BUILD_ID = "2024-12-19-v12"print("=" * 60)print(f"[STARTUP] CodePilot Chainlit App")print(f"[STARTUP] APP_VERSION: {APP_VERSION}")66 unmodified lines# Skip self-indexing - agents will only work with cloned GitHub repos# Create orchestrator and mark as readycl.user_session.set("orchestrator", Orchestrator(max_iterations=3))cl.user_session.set("ready", True)print("[CHAINLIT] Orchestrator created, ready for GitHub repos")19 unmodified lines202122232425262766 unmodified lines94959697989910019 unmodified lines# ============================================================# STARTUP VERSION CHECK - Change this to detect if rebuild worked# ============================================================APP_VERSION = "3.3.5-iteration-fix"BUILD_ID = "2024-12-19-v13"print("=" * 60)print(f"[STARTUP] CodePilot Chainlit App")print(f"[STARTUP] APP_VERSION: {APP_VERSION}")66 unmodified lines# Skip self-indexing - agents will only work with cloned GitHub repos# Create orchestrator and mark as readycl.user_session.set("orchestrator", Orchestrator(max_iterations=10))cl.user_session.set("ready", True)print("[CHAINLIT] Orchestrator created, ready for GitHub repos")
8 unmodified lines91011121314158 unmodified lines"""# VERSION CHECK - If you see this, new code is running!ORCHESTRATOR_VERSION = "3.3.4-resume-fix"print(f"[ORCHESTRATOR] ========== LOADING VERSION {ORCHESTRATOR_VERSION} ==========")from enum import Enum8 unmodified lines91011121314158 unmodified lines"""# VERSION CHECK - If you see this, new code is running!ORCHESTRATOR_VERSION = "3.3.5-iteration-fix"print(f"[ORCHESTRATOR] ========== LOADING VERSION {ORCHESTRATOR_VERSION} ==========")from enum import Enum
Dockerfile+1-1
chainlit_app.py+3-3
codepilot/agents/orchestrator.py+1-1