How to Use /goal and /routines in Claude Code for Autonomous Scheduled Workflows Anthropic's Claude Code now supports /goal and /routines commands that enable developers to define persistent objectives and schedule recurring tasks for autonomous execution, reducing the need for manual oversight in workflows like daily testing and documentation sync. How to Use /goal and /routines in Claude Code for Autonomous Scheduled Workflows Combine /goal and /routines in Claude Code to run recurring tasks autonomously. Learn how to set completion conditions so agents finish without stopping early. Running Recurring Tasks Without Babysitting Claude Code Most people use Claude Code as a back-and-forth assistant: ask a question, get an answer, ask again. That works fine for one-off tasks. But the moment you want Claude to do something on a schedule — run tests every morning, summarize new tickets weekly, keep documentation in sync — the interactive model breaks down fast. That’s where /goal and /routines come in. Together, these two Claude Code commands let you define what you want done and when to do it, then step away while Claude executes autonomously. No babysitting, no repeated prompts, no agent that stops halfway through because it wasn’t sure whether to proceed. This guide covers how each command works, how to combine them for scheduled autonomous workflows, and — critically — how to write completion conditions that prevent Claude from stopping early or spinning indefinitely. What /goal Actually Does The /goal command sets a persistent, top-level objective for your Claude Code session. Instead of issuing individual task instructions and hoping Claude holds context, /goal anchors everything Claude does to a single declared outcome. Think of it less like a prompt and more like a contract. You’re telling Claude: this is the definition of done. Everything else is a step toward that. Syntax and Basic Usage /goal