back to claude code cli + updating and improving#8
Merged
edgarpavlovsky merged 7 commits intomainfrom Jan 22, 2026
Merged
Conversation
Compares frankbria/ralph-claude-code with Fireteam to identify: - Where Fireteam excels (complexity routing, SDK integration, parallel reviews) - Where Ralph excels (circuit breaker, rate limiting, session continuity) - Actionable improvements to pull into Fireteam Key findings: - Fireteam has stronger architectural foundation - Ralph has critical safety mechanisms we lack (circuit breaker, rate limiting) - Recommended: implement circuit breaker and rate limiting as priority
Updated Ralph comparison audit to highlight that: - Ralph piggybacks on Claude Code session (user's existing credits) - Fireteam requires separate ANTHROPIC_API_KEY (separate billing) This is now Priority 0 - foundational architectural change needed. Users shouldn't need two billing sources to use Fireteam. Added implementation approaches for fixing this gap.
Major architectural refactor to close the gaps identified in the Ralph vs Fireteam audit: 1. **Claude Code Session Piggybacking** (Priority 0) - New claude_cli.py wraps `claude` CLI instead of SDK direct API - Uses --session-id and --resume for session continuity - Piggybacks on user's Claude Code session/credits - No separate ANTHROPIC_API_KEY required 2. **Circuit Breaker Pattern** (Priority 1) - New circuit_breaker.py with warn behavior - Tracks: files changed, repeated errors, output length decline - Three states: CLOSED → HALF_OPEN → OPEN - Issues warnings but doesn't halt (per user preference) 3. **Rate Limiting** (Priority 1) - New rate_limiter.py for API budget management - Configurable calls per hour (default: 100) - Wait-for-reset or raise exception options 4. **Dual-Gate Exit Detection** (Priority 2) - Executor can signal WORK_COMPLETE: false - Both reviewer pass AND executor signal required for completion - Respects Claude's judgment over automation assumptions 5. **Session Continuity** (Priority 3) - Leverages Claude Code's native --resume/--continue - CLISession tracks session_id across iterations - No custom persistence needed Updated: - loops.py: Uses CLI wrapper instead of SDK - complexity.py: Uses CLI wrapper for estimation - api.py: New parameters for rate limiting and circuit breaker - __init__.py: Exports new modules - All tests updated to mock CLI instead of SDK All 92 tests pass.
Adds lean tmux integration for running Fireteam as an autonomous agent until project completion: New module: runner.py - start_session(): Start autonomous execution in detached tmux - attach_session(): Attach to running session - kill_session(): Terminate a session - list_sessions(): List all Fireteam sessions - tail_log(): View recent log output CLI entry point (fireteam command): fireteam start -p /path -g "goal" # Start autonomous session fireteam list # List running sessions fireteam attach <name> # Attach to session fireteam logs <name> # View logs fireteam kill <name> # Terminate session Features: - Sessions run in detached tmux, persist across terminal disconnects - Logs saved to ~/.fireteam/logs/ for debugging - Session state tracked in ~/.fireteam/<session>.json - Auto-generated session names from project directory No web UI - designed to eventually integrate with Pentagon for more extensive UI capabilities.
- Add --goal-file and --edit flags to fireteam start/run commands - Update runner to use resolve_prompt() for flexible prompt sources - Export Prompt and resolve_prompt from __init__.py - Add comprehensive tests for prompt parsing (32 tests) Prompt sources (in priority order): 1. --goal "string" - explicit goal string 2. --goal-file path.md - markdown file with @file includes 3. Auto-detect PROMPT.md or .fireteam/prompt.md 4. --edit - open editor interactively
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.