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 Routines landed in the documentation this week with 584 Hacker News points - enough to indicate this is a feature developers have been wanting. The pitch is simple: if you keep giving Claude Code the same set of instructions at the start of a session, you can now save that as a Routine and invoke it with a single command. The deeper story is what this signals about where Claude Code is heading.

What Routines actually are

A Routine in Claude Code is a saved, named workflow - a sequence of instructions, context-setting commands, and behavioral guidelines that you would otherwise type out at the start of every session. Instead of beginning each session with the same block of text telling Claude how your project is structured, what conventions to follow, and what to do first, you define that once as a Routine and invoke it by name.

The practical effect is that you stop training Claude Code on your project at the start of every session and start from a consistent, well-defined baseline instead. If you have developed a workflow that works well for a specific kind of task - adding tests, reviewing pull requests, refactoring for readability - you can capture it and replay it reliably.

How this differs from CLAUDE.md

CLAUDE.md is a project-level file that Claude Code reads at session start. It is useful for persistent project context - conventions, architecture notes, things Claude should always know. Routines are different: they are task-level workflows that you invoke intentionally rather than context that loads automatically.

The distinction matters for complex projects where different tasks require different working modes. A Routine for 'review this PR' is different from a Routine for 'add a new API endpoint' - each sets up Claude Code with the right framing, tools, and behavioral constraints for that specific kind of work. CLAUDE.md handles the static context; Routines handle the dynamic workflow.

How it fits with the Claude Code extension ecosystem

Routines are Anthropic's official answer to a problem the community has been solving with unofficial tools. The Caveman skill saves tokens by compressing context. The Claudraband tool creates persistent tmux sessions for complex multi-step work. Both emerged because developers needed ways to shape and persist Claude Code's behavior across sessions.

Routines occupy a different part of that space - not token compression or session management, but workflow capture and replay. All three are addressing the same underlying need: Claude Code's default behavior is a starting point, and serious users want to build on top of it. The fact that Anthropic shipped Routines suggests they are paying attention to what the community has been building and integrating the most useful patterns into the core product.

Practical use cases

The most obvious use case is project onboarding. Any developer who works across multiple repositories or frequently brings Claude Code into a new project knows the friction of establishing context. A Routine that sets up the project structure, describes the codebase architecture, and configures working preferences eliminates that friction for every subsequent session.

Testing workflows are another strong fit. A Routine that tells Claude Code to always run tests before and after edits, to output a summary of what changed and why, and to flag any test failures for review before continuing - these are the kinds of behavioral guidelines that improve output quality but require consistent reinforcement without Routines.

Code review is a third clear use case. A Routine that focuses Claude Code on a specific pull request, asks it to check for security issues, performance regressions, and style violations, and produces a structured report is reusable across every PR review without re-prompting.

What this means for how you use Claude Code

Routines are most valuable for developers who use Claude Code heavily and have already figured out what works for their projects. If you are still experimenting with what Claude Code can do, you don't have workflows worth saving yet. But once you have a session that went well - where the setup, the framing, and the behavioral guidelines produced exactly the output you needed - Routines give you a way to reproduce that.

Combined with the cost management strategies from the spending reallocation post and the session organization that tools like Claudraband provide, Routines round out the toolkit for getting consistent, high-quality output from Claude Code over time. The platform is maturing from a capable but somewhat unpredictable agent into something more structured and reproducible - and that is the direction it needs to go to become a reliable engineering resource rather than an impressive demo.

Comments

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