Automating PR Workflows with Claude Task Master
Claude Task Master (claudetm) is a CLI tool built on the Claude Agent SDK that keeps Claude working until a goal is achieved. It follows a PR based workflow, handling planning, code changes, CI failures, review comments, and merges automatically. This article explains how the tool works, why it is useful for modern development teams, and how to get started.
Core Workflow
The tool follows a four-stage loop:
- Planning - Claude reads the codebase, creates a task list, and defines success criteria.
- Working - For each task Claude makes changes, runs tests, commits, and pushes to a branch.
- PR Lifecycle - A pull request is opened. Claude waits for CI checks, fixes failures, addresses review comments, and merges when approved.
- Verification - Final tests and lint checks confirm that all success criteria are met before the task is marked complete.
The loop runs autonomously until the goal is satisfied or human input is required.
State Persistence
One of the strongest features is state persistence. If the process is interrupted - by a server restart, network outage, or a manual stop - Claude Task Master stores its progress. When restarted, it resumes exactly where it left off, avoiding duplicate work.
Profiles for Parallel Execution
Claude Task Master supports multiple isolated profiles. Each profile has its own Claude Code configuration directory (~/.claudetm/profiles/<name>/). This allows teams to run several Claude subscriptions in parallel without credential clashes. Profiles can be based on OAuth sessions or direct API keys, making the tool flexible for different environments.
Extending with REST API and Webhooks
Beyond the CLI, the tool offers a REST API, an MCP server, and HMAC-signed webhooks. These interfaces expose the same lifecycle programmatically, enabling integration with custom dashboards, CI pipelines, or other automation systems.
Example: Dispatching a Task via REST API
curl -X POST https://your-server.com/api/tasks \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"goal":"Add user authentication with tests","profile":"my-profile"}'
The server creates a new task, stores its state, and returns a task ID that can be polled for updates.
Quick Start
# Install via pip or uv
uv tool install claude-task-master
# Authenticate with Claude first
claude login
# Run a task in your project
cd your-project
claudetm start "Add user authentication with tests"
The command triggers the autonomous loop described above. The tool will open a PR, handle any CI failures, and merge when everything passes.
When to Use Claude Task Master
- Teams already using Claude Code that want end-to-end PR automation.
- Projects with well-scoped goals that can be verified against explicit success criteria.
- Organizations running multiple Claude subscriptions that need isolation between them.
Conclusion
Claude Task Master offers a hands-off development experience that reduces manual overhead while preserving the safety of PR-based workflows. By persisting state, supporting parallel profiles, and exposing programmable interfaces, it fits naturally into modern engineering pipelines. Try it today and see how autonomous PR management can accelerate your projects.
https://github.com/developerz-ai/claude-task-master #ClaudeCode #AIAgents
Top comments (0)