← Guides
10 November 2026 · Junaid Khalid · 18 min read

Claude Code Tasks: How the Task List Works, and Where It Stops

Claude Code tasks are the built-in checklist Claude writes to plan multi-step work. Four tools manage it, TaskCreate, TaskGet, TaskList and TaskUpdate, and each task is pending, in progress or completed. The lists are files in ~/.claude/tasks/. They survive context compaction, and two sessions can share one by setting CLAUDE_CODE_TASK_LIST_ID.

Two things trip people up. Newer models start with the task tools switched off, so the list sits empty until you opt in. And Claude Code uses the word "tasks" for three separate features. Every claim below is checked against Anthropic's Claude Code docs as of November 10, 2026.

Key takeaways

What are Claude Code tasks?

Claude Code tasks are the entries in a session's task list: the plan Claude writes for itself when a request has several steps, one line per step. The docs define it in one line:

"The task list is Claude's to-do checklist: items Claude created to plan multi-step work, with indicators showing what's pending, in progress, or complete." (Claude Code docs, Task list)

Claude drives the tools, not you. Ask for "migrate the billing tests to Vitest" and Claude might write five tasks, start the first, and tick each off as its step passes. Your controls are small:

Here is the kind of list Claude writes for that request, as it looks mid-run (the step names are ours; the states and the dependency are how the task list works):

[completed]    1. Inventory Jest-specific APIs used in billing tests
[in_progress]  2. Add Vitest config and test script
[pending]      3. Port billing/*.test.ts to Vitest
[pending]      4. Fix snapshot and timer mocks        blocked by 3
[pending]      5. Remove Jest from package.json        blocked by 3, 4

Tasks 4 and 5 depend on earlier ones, so Claude, or a teammate in an agent team, will not start them until their blockers are completed.

Before tasks there was TodoWrite, one tool that rewrote a flat checklist on every change. Tasks added dependencies and a list two sessions can share. Two early write-ups, ClaudeFast's task management guide and the Claude Code Ultimate Guide on GitHub, are still worth reading, with two corrections from the current docs: the view shows five tasks, not ten, and the legacy switch is CLAUDE_CODE_ENABLE_TASKS=0.

Which tools does Claude Code use for tasks?

Claude Code uses four current task tools plus one legacy tool, listed in the tools reference:

Tool What it does Notes
TaskCreate Creates a task in the list Fires the TaskCreated hook
TaskGet Returns full details of one task Includes the description and dependencies
TaskList Lists all tasks with their current status The quickest way to see the whole plan
TaskUpdate Changes status, dependencies or details, or deletes Completing fires the TaskCompleted hook
TodoWrite The legacy checklist tool Off unless you set CLAUDE_CODE_ENABLE_TASKS=0

Two names look related but are not. TaskStop stops a background shell or agent, and the /tasks command lists background work such as running shells and subagents. Neither touches the task list.

The status flow is fixed. The Agent SDK todo tracking page describes it as created (pending), activated (in_progress), completed, and removed by setting status: "deleted" through TaskUpdate. There is no review or approved state.

Why is my Claude Code task list empty?

Your task list is empty because the task tools only load by default on Opus 4.7, Sonnet 4.6, Haiku 4.5 and earlier models. On newer models and unrecognized model IDs, Claude Code leaves them out, and Claude tracks steps in its head instead. Anthropic's reason:

"On newer models, Claude keeps track of multi-step work without a written checklist, and the tools' definitions and reminders take up context." (tools reference, Task tool availability)

That default applies from Claude Code v2.1.268. To turn the tools back on, pick one:

CLAUDE_CODE_ENABLE_TODO_TOOLS=1 claude
claude --allowedTools TaskCreate
claude --settings '{"env":{"CLAUDE_CODE_ENABLE_TODO_TOOLS":"1"}}'

The first is simplest for your own terminal. Use the third if you run agent teams in split panes: a split-pane teammate is a separate process that does not receive a variable you exported, but it does receive your --settings value. Subagents only get the task tools when your main session has them, whatever model the subagent runs. Background and cloud sessions always have them.

Opting in is a judgment call. For a one-file fix, the list adds context and little else. For a migration across 20 files, or anything you will resume tomorrow, a written list is worth the tokens.

Where are Claude Code tasks stored?

Tasks are stored as files in ~/.claude/tasks/, one directory per list, in your home directory rather than the project. Unless you name a list, it belongs to one session. A team gets ~/.claude/tasks/{team-name}/, which stays on disk after the session ends.

Two facts from the .claude directory reference matter here:

  1. tasks/ is on the automatic cleanup list. Files older than cleanupPeriodDays are deleted, and the default is 30 days.
  2. The lists live on one machine. A teammate, a CI runner or your laptop at home sees none of it.

If you want a task list to outlast a month, raise cleanupPeriodDays in settings, or better, write what mattered somewhere durable when the task closes (the hook below does exactly that).

How do you share a task list across sessions and agents?

Set CLAUDE_CODE_TASK_LIST_ID to the same name in each session. Claude Code then reads and writes one named directory in ~/.claude/tasks/ instead of a per-session one:

CLAUDE_CODE_TASK_LIST_ID=billing-refactor claude

Open a second terminal with the same command and both sessions see the same tasks. This is the simplest way to split a plan between a session that writes code and one that writes tests. Pick an ID per piece of work, not per repo, or old tasks pile into every new session.

Agent teams take this further. They are experimental and switched on with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. The lead creates tasks, and teammates claim them, with file locking so two never grab the same one. A task that depends on another shows as blocked, teammates do not self-claim blocked tasks, and dependents unblock automatically when the blocker completes. The docs also name the failure mode you will hit:

"Task status can lag: teammates sometimes fail to mark tasks as completed, which blocks dependent tasks." (agent teams docs)

When a team stalls, check whether the blocking task is really done before you restart anyone.

What is the difference between tasks, /tasks and scheduled tasks?

Claude Code uses the word "tasks" for three features. The task list is Claude's plan for the current work, /tasks shows background processes, and scheduled tasks run prompts on a timer. Here is how they compare, from the scheduling docs and the cloud scheduled tasks page:

Feature What it is Runs where Lasts
Task list (TaskCreate and friends) Claude's checklist for multi-step work Your machine Until cleared or swept after 30 days
/tasks View of background shells and subagents Your machine The session
/loop and CronCreate A prompt repeated inside an open session Your machine, session open Recurring tasks expire after 7 days
Desktop scheduled task A new local session on a schedule Your machine, app open and awake Persists across restarts
Cloud scheduled task (formerly routines) A saved prompt, repos and connectors run on a schedule, API call or GitHub event Anthropic's cloud Persists across restarts, minimum interval 1 hour

Two scheduling lines you can paste into a session:

/loop 10m check whether CI passed on this branch and fix any failing test
schedule "review open PRs and summarize blockers" with cron 30 8 * * 1-5

The first repeats a prompt every 10 minutes while the session stays open. The second asks Claude to call CronCreate with 30 8 * * 1-5, which reads as minute 30, hour 8, any day of the month, any month, Monday to Friday: 8:30am on weekdays in your local time. A bare /loop with no prompt runs the built-in maintenance prompt, or your own .claude/loop.md if one exists.

The session-scoped scheduler has hard limits worth knowing before you rely on it:

Cloud scheduled tasks are on Pro, Max, Ultra, Team and Enterprise plans and are created at claude.ai/code/routines or with /schedule. One line on that page sets the limit for teams: "They are not shared with teammates."

How do you make Claude use tasks the way your team works?

Put the rules in CLAUDE.md and enforce the important ones with hooks. First decide when tasks earn their context cost:

CLAUDE.md tells Claude when to create tasks and what a good one looks like. The TaskCreated and TaskCompleted hooks run on every task and can refuse one by exiting with code 2, which sends your message back to Claude (hooks reference).

Copy this into your project's CLAUDE.md and edit the tracker line to match your setup:

Tasks and tickets

1. For any request with 3 or more steps, create tasks with TaskCreate before editing files.
2. One task = one verifiable outcome. Subject starts with a verb: "Add retry to webhook sender".
3. Put the acceptance check in the description: the test, command or URL that proves it is done.
4. Mark a task in_progress before you start it and completed only after its check passes.
5. If a step depends on another, set the dependency instead of relying on order.
6. When a task changes code other people will review, it also needs a ticket in our tracker:
   create or update the ticket over MCP, link the branch and PR, and close the ticket with
   the proof link. Do not mark the ticket done without that link.
7. Before ending the session, list open tasks and say which ones carry over.

Then add a hook that keeps a record after the 30-day sweep. This one appends every completed task to a ledger file with the session, branch and time. Save it as ~/.claude/hooks/task-ledger.sh (it needs jq; the settings below run it with bash, so no shebang line is needed):

INPUT=$(cat)
DIR=$(echo "$INPUT" | jq -r '.cwd')
BRANCH=$(git -C "$DIR" branch --show-current 2>/dev/null)
echo "$INPUT" | jq -c --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg branch "$BRANCH" \
  '{ts: $ts, session: .session_id, task: .task_id, subject: .task_subject, by: (.teammate_name // "main"), cwd: .cwd, branch: $branch}' \
  >> "$HOME/.claude/task-ledger.jsonl"
exit 0

Register it in ~/.claude/settings.json. TaskCompleted takes no matcher, so it fires on every completion:

{
  "hooks": {
    "TaskCompleted": [
      {
        "hooks": [
          { "type": "command", "command": "bash ~/.claude/hooks/task-ledger.sh" }
        ]
      }
    ]
  }
}

To make completion strict, have the same hook run your tests first and refuse the completion on failure, the pattern from the docs' own example. Insert these lines in task-ledger.sh right after INPUT=$(cat), so a task reaches the ledger only once its tests pass. The cd runs the tests in the session's project folder; swap npm test for your own test command:

SUBJECT=$(echo "$INPUT" | jq -r '.task_subject')
cd "$(echo "$INPUT" | jq -r '.cwd')" || exit 0
if ! npm test >&2; then
  echo "Tests are failing. Fix them before completing: $SUBJECT" >&2
  exit 2
fi

Exit code 2 keeps the task open and sends the message back to Claude. That gives you a local close gate. It still only proves something to you.

What can't Claude Code tasks do for a team?

Claude Code tasks track one agent's plan on one machine. A task holds a subject, a description, a status and its dependencies; it records no owner outside the session, no token cost and no proof of done, and the file is swept after 30 days. For a working checklist that is fine. For anything a lead or reviewer must see later, keep the record in a tracker.

The gaps, each checked against the docs:

A team needs Claude Code tasks today
A teammate or lead can see the work Files in one user's ~/.claude/tasks/; cloud scheduled tasks are not shared
History after the work is done Swept after cleanupPeriodDays, default 30
Who did it and with which model Session and teammate name only in hook input
What it cost in tokens Not recorded on the task
Proof that "completed" is true A status change; a hook can block it, but no link is stored
A human decision or approval No approved or waiting-on-human state

Use this checklist to decide when a local task should become a ticket. If any line is true, promote it:

Promote a Claude Code task to a ticket when:
[ ] someone other than you will review, test or approve the result
[ ] it will not finish in this session, or another agent may pick it up
[ ] it changes production code, data, billing or anything a customer sees
[ ] it needs a decision from a person before the agent can continue
[ ] you will want to know later what it cost in tokens or time
[ ] the close needs evidence: a PR, a deploy URL, a test run, a screenshot
[ ] it is blocked by something outside the repo (a vendor, a key, another team)
Keep it a local task when none of the above apply.

The ticket half runs over the Model Context Protocol (MCP), so Claude Code can write to whichever tracker you use. Linear ships an official MCP server and Atlassian has the Atlassian MCP server for Jira; our guides to the Linear MCP server and the Jira MCP server cover setup and limits.

What did our own agents' tracked work show?

We run Claude Code every day and moved our tracking off ClickUp in October: 3,528 tickets and 2,614 comments over its API. Since October 17, 2026, our team and agents have created 504 tickets natively, and 276 are done.

Our agents logged 22 work sessions on 19 tickets, 672 minutes in total, 21 of them from Claude Code. One session on claude-opus-5-5 ran 32 minutes and used 1.4 million input tokens and 60,000 output tokens on a single ticket. Agents also wrote 20 work-trail entries against tickets. None of that would exist in ~/.claude/tasks/, which holds what the plan was, not what it took.

The number that changed our habits was 25. That is how many thin closing notes our close gate refused before a ticket could close, each rewritten with a link or a real report. A TaskCompleted hook can enforce the same rule locally, but only the ticket keeps the proof.

Where does a team tracker fit with Claude Code tasks?

Keep Claude Code tasks for the step-by-step plan inside a session, and put the unit of work people care about in a tracker the agent can write to. Jenzo is a ticket tracker built for teams where AI agents do much of the work, and it covers the gaps in the table above. It has no sprint planning or docs, so it does not replace a wiki.

Claude Code connects to Jenzo's remote MCP server with a personal bearer token; --scope user makes it available in every project:

claude mcp add --scope user --transport http jenzo https://api.jenzo.ai/mcp --header "Authorization: Bearer YOUR_TOKEN"

From there the agent opens, updates and closes tickets itself. It starts its own clock on a ticket, reports tokens, and logs the files, branch, PR, commits and cost it touched. A ticket can't close without proof, a link or a real closing report, for agents and people alike. When the agent needs a person it marks the ticket waiting on a human and its clock pauses; before stopping it leaves a handoff that the next session resumes from. See how it works on the home page, read our guide to AI agent management platforms for the wider picture, or compare AI task managers if you are choosing a tool.

FAQ

What are tasks in Claude Code?

Tasks are entries in Claude Code's task list, the checklist Claude writes when a request has several steps. Claude manages them with TaskCreate, TaskGet, TaskList and TaskUpdate, and each is pending, in progress or completed. Press Ctrl+T to show the list. Tasks survive context compaction and can depend on other tasks, so Claude works steps in the right order.

Where are Claude Code tasks stored?

They are stored as files in ~/.claude/tasks/ in your home directory, one directory per list. A shared list uses the name you set in CLAUDE_CODE_TASK_LIST_ID, and an agent team uses a session-derived team name. Claude Code deletes task files older than cleanupPeriodDays, which defaults to 30 days, so copy anything you need to keep.

Why doesn't Claude Code show a task list?

Since v2.1.268, the task tools load by default only on Opus 4.7, Sonnet 4.6, Haiku 4.5 and earlier models. On newer models Claude tracks steps without a written list. Start Claude Code with CLAUDE_CODE_ENABLE_TODO_TOOLS=1, or pass --allowedTools TaskCreate, to turn the list back on for any model.

How do I share a task list between Claude Code sessions?

Start each session with the same CLAUDE_CODE_TASK_LIST_ID, for example CLAUDE_CODE_TASK_LIST_ID=billing-refactor claude. Every session with that ID reads and writes one named list in ~/.claude/tasks/. It works only on one machine, and the sessions need the task tools. For split-pane agent teams, pass the variable through --settings so teammates receive it.

What is the difference between Claude Code tasks and scheduled tasks?

Tasks are Claude's checklist for current work. Scheduled tasks run a prompt on a timer: /loop and CronCreate inside an open session (up to 50, recurring ones expire after 7 days), Desktop scheduled tasks on your machine, and cloud scheduled tasks on Anthropic's servers with a 1-hour minimum interval. The /tasks command is a third thing: it lists background shells and subagents.

Can Claude Code run tasks automatically on a schedule?

Yes. Type /loop 5m check the deploy to repeat a prompt while the session is open, or ask Claude for a cron schedule. For work that must run with your laptop closed, create a cloud scheduled task at claude.ai/code/routines or with /schedule, on Pro, Max, Ultra, Team or Enterprise. Cloud scheduled tasks belong to your account and are not shared with teammates.

Can I stop Claude from marking a task complete too early?

Yes, with a TaskCompleted hook. It runs whenever a task is marked completed, and exiting with code 2 blocks the completion and sends your stderr message back to Claude. A common pattern runs the test suite and blocks on failure. A TaskCreated hook can likewise refuse tasks whose subject does not follow your naming rule.

From our own experience

What surprised us while checking the docs was how many guides still describe tasks that newer models never create: the default changed, and an empty list looks like a bug. Our setup now is simple. Claude Code keeps its own task list for the steps, and every piece of work that someone else will review gets a ticket the agent opens and closes with proof.

Let your agents keep the board.

Claude Code, Codex and Cursor open their own tickets, log hours and tokens, and close them with the commit.

Connect your agent