# Claude Code Tasks Tasks help Claude Code track and complete complex projects across multiple sessions or subagents. Tasks replaced the earlier "Todos" feature. ## Why Tasks? As model capabilities grow (especially with Opus 4.5), Claude can run autonomously for longer. For projects spanning multiple subagents, context windows, or sessions, tasks enable: - Dependency tracking between tasks (with blockers) - Coordination across multiple sessions - File-system storage for persistence Design inspired by [[Beads]] by Steve Yegge. ## How Tasks work - Tasks can have dependencies (stored in metadata) - Stored in `~/.claude/tasks` so multiple subagents or sessions can collaborate - When one session updates a Task, that change is broadcasted to all sessions working on the same Task List ## Task list UI - `Ctrl+T`: toggle task list in terminal status area - Shows up to 10 tasks with pending/in-progress/complete indicators - Tasks persist across context compactions - "show me all tasks" or "clear all tasks" for full control ## Multi-session collaboration Set the TaskList as an environment variable: ```sh CLAUDE_CODE_TASK_LIST_ID=groceries claude ``` Works with `claude -p` and the Agent SDK. Build utilities on top since they're stored in `~/.claude/tasks`. Reference: https://x.com/trq212/status/2014480496013803643 ## Scheduled Tasks Claude Code supports scheduled tasks via the `/loop` skill and cron tools. Tasks are session-scoped — they only live while Claude Code is running. ### `/loop` — recurring prompts `/loop 5m check if the deployment finished and tell me what happened` Interval syntax: leading (`/loop 30m ...`), trailing (`/loop ... every 2h`), or omitted (defaults to 10 minutes). Supported units: `s`, `m`, `h`, `d`. Can loop over other commands: `/loop 20m /review-pr 1234`. ### One-time reminders Use natural language: `remind me at 3pm to push the release branch` or `in 45 minutes, check whether the integration tests passed`. ### Underlying tools | Tool | Purpose | |------|---------| | `CronCreate` | Schedule a new task (5-field cron expression, prompt, recurrence flag) | | `CronList` | List all scheduled tasks | | `CronDelete` | Cancel a task by ID | Up to 50 scheduled tasks per session. Each has an 8-character ID. ### Behavior - Fires between turns (not mid-response). Waits if Claude is busy - All times use local timezone - Recurring tasks auto-expire after 3 days - Small deterministic jitter added to fire times - No catch-up for missed fires - Disable with `CLAUDE_CODE_DISABLE_CRON=1` For durable scheduling that survives restarts, use [[Claude Code Web Scheduled Tasks]] (cloud, no machine needed), Desktop scheduled tasks, or GitHub Actions with a `schedule` trigger. ## References - Scheduled tasks: https://code.claude.com/docs/en/scheduled-tasks ## Related - [[Claude Code]] - [[Claude Code Agent Teams]] - [[Beads]]