DEV Community

developerz.ai
developerz.ai

Posted on

Automating PR Workflows with Claude Task Master

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:

  1. Planning - Claude reads the codebase, creates a task list, and defines success criteria.
  2. Working - For each task Claude makes changes, runs tests, commits, and pushes to a branch.
  3. PR Lifecycle - A pull request is opened. Claude waits for CI checks, fixes failures, addresses review comments, and merges when approved.
  4. 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"}'
Enter fullscreen mode Exit fullscreen mode

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"
Enter fullscreen mode Exit fullscreen mode

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)