ai-codeannouncements

Claude Code Routines: Save and Replay Your Best Coding Workflows

Anthropic quietly shipped Routines to Claude Code - a way to save, name, and replay the agent workflows that work best for your projects. Here's what they are and why they matter.

April 17, 2026

Claude Code Routines: Save and Replay Your Best Coding Workflows

Claude Code just got a feature that solves a problem most power users have been hacking around: Routines. If you've ever caught yourself typing the same project setup, the same code review checklist, or the same testing instructions at the start of every session, you can now save that sequence once and invoke it with a single command.

The feature is deceptively simple. The implications are larger.

What a Routine actually is

A Routine is a saved, named workflow - the sequence of instructions, context-setting commands, and behavioral guidelines you'd normally type out manually at the start of a session. Instead of pasting the same block of text that describes your project structure, code conventions, and working preferences every time you open Claude Code, you define that once as a Routine and invoke it by name.

The practical effect: you stop training Claude Code on your project assumptions at the start of every session. You start from a consistent, documented baseline instead. If you have a workflow that works reliably for a specific task - adding tests, reviewing pull requests, refactoring for performance - you capture it and replay it without drift.

This matters more than it initially sounds. Claude Code's behavior can vary based on context, framing, and how you set up your initial prompt. Routines lock in the setup that produced good results and let you reproduce it reliably. It's the difference between hoping Claude Code approaches a task the way you want and knowing it will.

Routines vs. CLAUDE.md - they solve different problems

CLAUDE.md is a persistent project-level file that Claude Code reads automatically at the start of every session. It's built for static context - architecture notes, naming conventions, dependencies, things Claude should always know about your codebase.

Routines are task-level workflows that you invoke intentionally. They're for dynamic, situational behavior. A Routine for reviewing a pull request is completely different from a Routine for adding a new API endpoint. Each one sets up Claude Code with the right framing, tool priorities, and guardrails for that specific kind of work.

CLAUDE.md Routines
Loads automatically Invoked intentionally
Project-wide context Task-specific workflows
Static information Dynamic instructions
Always active Activated per session

In complex projects, this distinction lets you maintain one source of truth about your codebase while having multiple, sharply-focused working modes for different kinds of tasks.

The community was already building this

Routines didn't emerge in a vacuum. The developer community has been solving this problem with unofficial tools for months. The Caveman skill compresses context to save tokens. Tools like Claudraband create persistent tmux sessions for multi-step work that spans multiple Claude Code invocations. Both tried to address the same underlying friction: Claude Code's default behavior is a starting point, and serious users want to build on top of it.

Routines occupy a different layer - not token compression or session persistence, but workflow capture and replay. What matters is that Anthropic shipped this. It signals they're paying attention to what the community has actually built and integrating the patterns that work.

Where Routines shine

Project onboarding is the most obvious use case. If you work across multiple repositories or frequently bring Claude Code into a new codebase, you know the friction. A Routine that describes the project structure, explains the architecture, and sets working preferences eliminates that context-building tax for every subsequent session. You run the Routine once and Claude Code is aligned.

Testing workflows are a natural fit. A Routine that enforces running tests before and after changes, that outputs a structured summary of what changed and why, that surfaces test failures for review before continuing - these are behavioral guidelines that improve quality significantly but require consistent reinforcement. Without Routines, you're re-explaining the same process repeatedly.

Code review is the third clear case. A Routine that focuses Claude Code on a specific pull request, directs it to check for security issues, performance problems, and style violations, and produces a structured report is immediately reusable across every PR without re-prompting. You run the same Routine on every review and get consistent output.

The pattern here is workflows that are both repeatable and important enough to standardize. If you're doing something once or experimenting, Routines add overhead. If you're doing something regularly and the quality matters, they're essential.

Who benefits and when

Routines are most valuable for developers who use Claude Code heavily and have already figured out what works for their specific situation. If you're still experimenting with Claude Code's capabilities, you don't have workflows worth saving yet. You're still discovering what's possible.

Once you've had a session that produced exactly what you needed - where the setup, the framing, and the behavioral guidelines all aligned - Routines give you a way to reproduce that baseline consistently. That's when they shift from a nice-to-have to a productivity multiplier.

Combined with spending reallocation strategies and session organization tools, Routines complete a toolkit for getting reliable, high-quality output from Claude Code over time. The platform is maturing from an impressive but somewhat unpredictable agent into something more structured and repeatable. That's the only trajectory that makes it genuinely useful as an engineering resource rather than a capable demo.

The broader shift this represents

Routines signal something important about where AI agents are heading: personalization through workflow capture. Instead of building entirely new tools or waiting for AI models to become magically better at understanding your context, you define and save the workflows that work. You make the tool fit your process rather than fitting your process to the tool.

This is pragmatic. It doesn't require model improvements or new infrastructure. It just requires Anthropic acknowledging that developers know how to work with Claude Code better than the defaults assume, and giving you a way to codify that knowledge.

Comments

Some links in this article are affiliate links. Learn more.