-
Notifications
You must be signed in to change notification settings - Fork 290
fix: exit agent loop when all features pass #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: exit agent loop when all features pass #50
Conversation
Previously, the autonomous agent would continue running indefinitely even after all features passed verification. The agent would enter a verification loop, repeatedly checking 'All features are passing!' without ever exiting. This fix detects the completion message from feature_get_next() and gracefully exits the main loop with a victory banner, preventing unnecessary API calls and resource consumption. Fixes infinite loop when project reaches 100% completion.
📝 WalkthroughWalkthroughThe change updates an import path for ClaudeSDKClient and adds project completion detection logic to the autonomous agent loop. When responses contain "all features are passing" or "no more work to do" (case-insensitive), the agent prints a completion summary and terminates. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
agent.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (2)📚 Learning: 2026-01-10T08:23:04.012ZApplied to files:
📚 Learning: 2026-01-10T08:23:04.012ZApplied to files:
🧬 Code graph analysis (1)agent.py (1)
🔇 Additional comments (2)
Comment |
|
Great. Thanks this is a real problem. I will test |
…ures - Verified Kanban board renders 144 features without lag - Tested scrolling performance (0.1ms programmatic scroll) - All feature cards display correctly with proper data - Screenshots captured for verification Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Verified ? key opens keyboard shortcuts modal - Verified 8 shortcuts listed (?, A, D, G, K, N, ,, Esc) - Verified Escape key closes modal - Added verification screenshots Feature was already implemented, this commit documents verification. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Security Review Findings
|
|
I have merged the changes, but will add back the correct claude agent SDK, |
Changes: - Revert incorrect import from claude_code_sdk to claude_agent_sdk in agent.py (PR #50 introduced an undocumented change to a deprecated package) - Clear activeAgents and recentActivity in useWebSocket when agent stops to prevent stale UI state The claude_code_sdk package is deprecated (last updated Sep 2025) while claude_agent_sdk is the active, maintained package. The import change in PR #50 was undocumented and would have caused ImportError since only claude-agent-sdk is specified in requirements.txt. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Problem
The autonomous agent runs indefinitely after all features pass verification.
It enters an infinite "verification loop" - repeatedly calling
feature_get_next(),getting "All features are passing! No more work to do.", and starting a new session.
This wastes API credits and keeps the process running forever until manually killed.
Solution
Detect the completion message in the agent response and
breakout of the main loopwith a victory banner and final progress summary.
Testing
Before
After
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.