Artificial Intelligence

Build a Proactive Agent Workflow with Claude Code

June 7, 2026
·
Written by Claude AI

Key insights:

  • Routines turn Claude Code from a reactive tool into a proactive teammate that runs on schedules or events, opens PRs, and notifies you without needing your laptop open.
  • You set up a routine with /schedule, then define the prompt, repos, connectors, and trigger (time-based or GitHub/webhook events), while Claude handles hosting and execution.
  • The pattern fits many workflows beyond docs, including deploy verification, backlog triage, and on-call investigation, with the option to steer live sessions or keep humans in the loop.

Why proactive agents matter for modern developers

Coding agents shouldn't wait for you to press enter.

Right now, most developers treat Claude Code as a powerful coding tool. You type a prompt, hit enter, and wait for the result. But what if Claude could act like a real teammate instead? A teammate notices when something breaks and does something about it.

That's the shift Anthropic is pushing with a new feature called routines. It moves Claude Code from a reactive tool into a proactive teammate that reads your repo, runs on a schedule or event, and opens a PR before you've even opened your laptop.

What is the difference between a tool and a teammate?

A tool sits idle until you use it. A teammate works alongside you, anticipating problems and acting on them.

Think about your own workflow. How often do you repeat the same investigation, the same review, the same documentation update? Each of those is a candidate for automation.

With proactive agents, you stop being the trigger. The agent watches your repo, your deploys, or your issue tracker and kicks itself off.

Why have proactive agents been hard to build until now?

Building a proactive agent today means building a lot of infrastructure. You need hosting. You need data persistence. You need authentication. You need a way to trigger sessions reliably.

Running Claude Code on a cron job sounds simple. In practice, it means managing a server, handling failures, and maintaining boilerplate code that has nothing to do with your actual problem.

Most developers want to focus on what the agent does, not on where it lives or how it starts.

What problems do routines actually solve?

Routines solve three core challenges with proactive agents:

  • Where to run the agent so it isn't tied to your laptop being open
  • When to trigger the agent without building cron infrastructure yourself
  • How to steer the agent when you want to be in the loop or out of the loop

You define the prompt, the repos, the connectors, and the trigger. Claude Code handles the rest.

How routines work inside Claude Code

Routines are a new feature inside Claude Code that let you launch remote Claude Code sessions automatically. Every routine runs on managed infrastructure, so nothing depends on your local machine.

How do you create a routine in Claude Code?

You start with a single command inside Claude Code: /schedule.

From there, you describe what you want. For example, you might type: "Once a week, review all the new changes merged to main against our documentation repo and create a PR to update docs if you see any gaps."

Claude follows up with questions. What time do you want this to run? Should it notify you on Slack? Once you answer, Claude creates the routine for you.

You can then view and edit the routine on claude.ai under the code section.

What triggers can you use for a routine?

Routines support two main types of triggers:

  1. Schedule-based triggers that run on a time cadence like daily or weekly
  2. Event-based triggers that fire on GitHub events or your own custom webhooks

GitHub events are supported natively. You can trigger on a new issue, a merged PR, a release cut, or a labelled PR.

For custom events, you post to a webhook with your own event payload, and the routine kicks off with that context.

How do you provide context to a routine?

Context is the ceiling of what your agent can do. Without the right information and tools, Claude can't be successful.

You can connect one or more code repositories so Claude can read the source and open PRs. You can also attach connectors like Google Drive for documents, Slack for notifications, or the GitHub MCP for issue management.

Think carefully about what Claude needs:

  • The source repos relevant to the task
  • External documents or briefs for style and tone
  • Notification channels to keep you informed
  • Monitoring tools if the task involves health checks

A real example: automating documentation with routines

At Anthropic, weekly PRs for Claude Code have gone up 200% since the start of the year. That's great for engineers and great for users who get new features quickly. It's not so great for the single engineer responsible for keeping documentation in sync.

How can you set up a weekly documentation sync?

The first routine is simple. Once a week, Claude reviews all changes merged to the Claude Code source repo and compares them against the documentation repo.

If Claude finds gaps, it opens a PR in the docs repo with the updates. It pings the maintainer on Slack so they know to review.

The trigger is a weekly schedule. The context includes the source repo, the docs repo, GitHub, and Slack. The output is a PR ready for human review.

How do you trigger a routine on a GitHub issue?

The second routine reacts to new GitHub issues opened on the docs repo.

The instructions tell Claude to investigate the issue, decide if it's a real documentation gap, and if so, open a PR and notify the team on Slack.

The trigger is a GitHub event for issue opens. The context is the same two repos plus Slack and the GitHub MCP. The session begins with the issue body passed in as context, so Claude knows exactly what to look at.

This pattern works for any repo where users file gaps as issues. Claude becomes the first responder.

How do you steer Claude during a live routine session?

Routines aren't fire and forget. Every routine is a Claude Code session you can open, watch, and steer in real time.

You can jump into the session on the web, read Claude's analysis, and push it in a different direction. You can stop a session early if you already handled the issue. You can resume a past routine and continue the conversation.

This matters because sometimes you want a human in the loop and sometimes you don't. Routines give you both.

Applying routines to your own developer workflows

Routines work for far more than documentation. Any repeatable workflow that involves a trigger, some context, and a decision is a candidate.

How would you build a deploy verifier routine?

Imagine you just deployed a change to a service and you want to make sure it's healthy.

The trigger could be a webhook from your CD pipeline that fires after every deploy. The context would include the source code for the service, monitoring tools like Datadog or Grafana, and a notification channel like Slack or Twilio.

Claude investigates the deploy, reads the metrics, and gives you a go or no-go decision. Over time, as you trust it more, you can let Claude roll back the change itself if the data warrants it.

How can a PM use routines to triage backlog issues?

Product managers spend hours sifting through GitHub issues and Slack threads. A weekly routine can do that work for you.

Trigger it on a Monday morning schedule. Give it access to GitHub, Slack, and your issue tracker. Ask Claude to read every new issue, group them by theme, prioritise the most urgent, and post a summary in a channel.

You can take this further by having Claude open draft PRs for the highest priority bugs, so engineers walk in to ready work.

What about an on-call investigator?

On-call work is full of repeatable investigation patterns. When an alert fires, you check logs, look at recent deploys, and form a hypothesis.

A routine can do the first pass. Trigger it on a PagerDuty webhook. Give it access to your logs, your repo, and your monitoring tools. Have it post a triage summary in the incident channel within minutes.

You still make the final call. But you skip the boring first ten minutes of every incident.

Becoming the developer who builds the automation

Routines are a sign of where coding work is heading. The developers who win in the next few years aren't the ones racing AI on raw output. They're the ones designing the agents, the triggers, and the workflows that AI runs inside.

How do you build the skills to design these workflows?

Designing a good routine isn't just about prompts. It's about thinking like an automation engineer. You need to understand triggers, context, tools, error handling, and how to keep a human in the loop when it matters.

That's exactly the skill set taught inside the Complete RPA Bootcamp. You go from beginner to pro across Robotic Process Automation, Agentic Automation, Coded Automation, and Computer-Use Agents.

Instead of letting AI and automation replace you, you become the one building the AI and automation. It's a future-proof career path designed for this exact moment.

What kind of automations will you build?

Inside the bootcamp you build real, working automations end to end. You learn how to:

  • Design triggers for time-based and event-based workflows
  • Connect agents to APIs, repos, and business systems
  • Build agentic flows that make decisions and take actions
  • Combine coded automation with computer-use agents for tasks no API can reach

These are the same patterns Anthropic uses internally with routines, applied across a much wider range of business and technical problems.

Is now the right time to switch into automation?

Yes. Tools like Claude Code routines are making it possible for one developer to deliver the work of an entire team. Companies are noticing, and they need people who can design and ship these systems.

You can either watch this shift happen or be the person making it happen. The Complete RPA Bootcamp gives you the structured path to do that, without piecing together random tutorials.

To see routines in action and watch a full proactive agent workflow built end to end, watch the embedded video below from the Claude YouTube channel. It's the clearest walkthrough you'll find on turning Claude Code from a tool into a true teammate.