Continuous Claude: Continuous AI Agent for GitHub PRs
Run Claude Code or Codex CLI in a loop, autonomously creating PRs, waiting for checks, and merging, so large development tasks finish while you sleep.
Evidence shows the script creates branches, pushes, creates PRs, and merges, potentially automatically, but no user confirmation mechanism is provided, and data flow transparency is not explicit. Sensitive data handling is not mentioned, dependencies are installed via curl without checksums, external effects are significant (auto-merging PRs), rollback is limited (discarding failed branches), and source attribution is clear (author named). Deductions: lack of user confirmation, insufficient data flow transparency, and unverified dependency security.
The script's internal logic is consistent, and README descriptions match script functionality, but availability of external dependencies (gh, claude, codex) is unverified, and failure messages are provided but may be incomplete. Deductions: unverified dependency availability and potentially incomplete failure messages.
Clear target users (developers) and scenarios (automated testing, refactoring), clear capability boundaries (GitHub only), precise triggers (CLI arguments), and good environment fit (macOS/Linux/Windows). Deductions: no mention of non-GitHub platform support.
Clear information architecture, detailed installation notes, stable naming, abundant examples, explicit known limitations (GitHub only), MIT license, automated versioning, and clear maintenance responsibility (author). Deductions: maintenance responsibility not explicitly stated.
Usable outputs (PRs, merges), high marginal value (automating repetitive tasks), and reasonable cost-benefit (budget controls). Deductions: no actual run data provided.
README claims partially correspond to code, but lack independent verification, and facts vs. inferences are not clearly separated. Deductions: lack of independent verification and unclear separation of facts and inferences.
- Auto-merging PRs may pose risks; user confirmation is recommended.
- Dependencies installed via curl without checksums pose supply chain risks.
- No user confirmation mechanism may lead to unintended actions.
What does this agent do, and when should you use it?
Continuous Claude is a CLI tool that runs an AI coding agent (Claude Code or Codex CLI) in a continuous loop to iteratively complete large development tasks. In each iteration, it creates a new branch, lets the agent generate a commit, creates a pull request via the GitHub CLI, waits for CI checks and reviews, merges on success, or discards on failure. It maintains context across iterations via a shared markdown file (SHARED_TASK_NOTES.md), enabling the agent to remember prior progress and decisions. Inspired by CI/CD practices and GitHub Next's Continuous AI project, it focuses on automating mundane but careful tasks like raising test coverage, large refactors, or dependency updates. It offers both Bash and PowerShell runners and supports multiple run limits (iterations, cost, duration) and parallel execution via git worktrees.
Continuous Claude scripts perform the following operations: 1) Each iteration creates a new branch and runs the selected provider (claude or codex); 2) It commits and pushes the agent's changes; 3) It creates a pull request using gh pr create; 4) It polls CI checks and review status with gh pr checks until they pass; 5) On success, it merges the PR, pulls latest main, and cleans up the branch; 6) On failure, it closes the PR and discards the work. Before each run, it reads SHARED_TASK_NOTES.md and updates it afterwards to provide continuity. It also supports an optional reviewer pass (--review-prompt), cost limits (--max-cost), duration limits (--max-duration), and early stopping (--completion-threshold).
- A developer needs to raise test coverage on a large codebase from 0% to 80%+, and can run this overnight unattended.
- A maintainer wants to automatically check for dependency updates every morning and fix breaking changes afterwards.
- A team lead wants to break a monolith into modules via a series of PRs, each validated by CI.
- A developer wants to modernize callbacks to async/await across a large codebase without manual effort.
- A developer needs to complete a tedious refactor like unifying code style or updating to new standards.
- An open-source maintainer wants to use an AI agent to automatically handle incoming issues and generate fixes, reviewed by humans.
What are this agent's strengths and limitations?
- Fully automates the PR lifecycle including merging, requiring no human intervention for routine tasks.
- Achieves context continuity via shared notes file, reducing redundant work and improving efficiency over time.
- Supports two AI providers (Claude Code, Codex CLI) and can use different providers for implementation and review.
- Provides multiple run constraints (iteration count, cost, duration) to control time and resource usage.
- Supports parallel execution with git worktrees for independent tasks on the same repository.
- Depends on specific CLI tools and the GitHub API; only works with GitHub repositories, not other forges like Gitea.
- Could incur significant token costs when running many iterations, especially with expensive models.
- Failed iterations discard work, which can be wasteful, though progress is captured in notes for the next iteration.
- Requires manual setup and authentication of multiple tools (Claude/Codex, GitHub CLI), adding initial complexity.
- No documented support for private models or enterprise security features beyond standard GitHub workflows.
How do you install or deploy this agent?
Install with a single command:
curl -fsSL https://raw.githubusercontent.com/AnandChowdhary/continuous-claude/main/install.sh | bashOn Windows with PowerShell 7:
irm https://raw.githubusercontent.com/AnandChowdhary/continuous-claude/main/install.ps1 | iexManual installation: download the script, make it executable, and move it to a directory in your PATH. To uninstall, remove ~/.local/bin/continuous-claude or /usr/local/bin/continuous-claude.
How do you use this agent?
First, ensure required dependencies are installed and authenticated: Claude Code CLI (claude auth) or Codex CLI (codex login), GitHub CLI (gh auth login), and jq (for Bash runner). Then, in a git repository, run:
continuous-claude --prompt "add unit tests until all code is covered" --max-runs 5To use Codex as provider:
continuous-claude --provider codex --prompt "add unit tests" --max-runs 5You can limit cost or duration via --max-cost or --max-duration. Any unrecognized flags are forwarded to the agent CLI.
How does this agent compare with similar options?
GitHub Next's Continuous AI project explores similar loop-based agent execution, but Continuous Claude focuses on integrating directly with GitHub's PR workflow. It also mentions Dependabot for dependency updates, but notes that Continuous Claude can additionally fix breaking changes caused by updates.
FAQ
What API keys or credentials are required?
claude auth) or Codex CLI (codex login) and the GitHub CLI (gh auth login). These tools handle API key management.What happens if an iteration fails?
Can I control the cost?
--max-cost, a time limit with --max-duration, or an iteration count with --max-runs. You can also throttle calls per hour with --max-calls-per-hour.Does it work with non-GitHub git forges?
--disable-commits or --disable-branches, but without full PR automation.