mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 22:32:06 +00:00
fix: use is_initializer instead of undefined is_first_run variable
The PR #77 introduced a bug where `is_first_run` was used in the completion detection check, but this variable is only defined when `agent_type is None`. When the orchestrator runs agents with explicit `--agent-type` or `--feature-id`, the variable is undefined causing a NameError crash. Changed to use `is_initializer` which is always defined and has the correct semantic meaning for this check. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
4
agent.py
4
agent.py
@@ -186,8 +186,8 @@ async def run_autonomous_agent(
|
||||
iteration += 1
|
||||
|
||||
# Check if all features are already complete (before starting a new session)
|
||||
# Skip this check on first iteration if it's a fresh start (initializer needs to run)
|
||||
if not is_first_run and iteration == 1:
|
||||
# Skip this check if running as initializer (needs to create features first)
|
||||
if not is_initializer and iteration == 1:
|
||||
passing, in_progress, total = count_passing_tests(project_dir)
|
||||
if total > 0 and passing == total:
|
||||
print("\n" + "=" * 70)
|
||||
|
||||
Reference in New Issue
Block a user