Reusable agentic workflows, parallel sessions, and 1-hour prompt caching in the new desktop
A Routine is a defined sequence of agentic steps Claude Code executes without per-step prompting. Each step is a prompt-plus-tool-call pattern with conditional branching.
Unlike a bash script, the agent still reasons at each step. Unlike a one-shot prompt, the structure is reusable and pauseable.
Three components: trigger (slash command, file change, manual), steps (prompt + allowed tools + on_fail branch), completion condition.
| Dimension | Old Claude Code | With Routines + Multi-Session |
|---|---|---|
| Workflow | Manual prompt per step | Agent executes defined shape |
| Sessions | One at a time | 2-3 parallel contexts |
| Cache TTL | 5 minutes | 60 minutes (opt-in flag) |
| Code queries | Grep + file reads | LSP (definitions, types, refs) |
| Failure handling | Stops, waits for you | on_fail branch, retries once |
| Destructive ops | Always asks | requires_approval gate per step |