Skip to content
Mastering Claude

Home / Fundamentals and the agent loop

Fundamentals and the agent loop8 minFoundation

The task list and the status line

On the most recent models, the task list stays empty by default, with Claude managing multi step work without exposing it, while a status line configured by a script shows the active model, the context window and the session cost live.

The status line is a customisable bar that runs the shell script you configure, receiving the session's JSON data on its standard input. It appears in its own row, above the built in badges of the footer, without replacing them, and acts as a continuous reference point during a long session, where a task list acts as a reference point for a specific piece of multi step work.

An empty list by default on recent models

On Opus 4.8, Sonnet 5, Fable 5, Mythos 5 and later versions of these families, Claude Code tracks multi step work without a written checklist shown on screen, since the tool that would fill that list is not provided by default. To bring it back anyway on these models, one possible way is to set the environment variable CLAUDE_CODE_ENABLE_TODO_TOOLS=1 before launching the session, among other methods listed under the availability of the Task tool. On earlier models such as Opus 4.7, the behaviour remains a visible checklist, toggled by Ctrl+T, with up to five tasks shown and persistence across context compactions.

What the status line reads

A status line, declared through the statusLine setting, receives a complete JSON object on its standard input at every refresh, with specific fields, model.id and model.display_name for the active model, context_window.used_percentage and context_window.context_window_size for the context window, cost.total_cost_usd for the session cost calculated client side. A rate_limits block only appears for Claude.ai Pro and Max subscribers, or behind a gateway that sets a spending limit, and only after the session's first API response, with three possible windows, five hours, seven days, and a spending limit that additionally requires a recent version of the tool.

Here is an example that builds its own object in memory to illustrate the shape received by a status line script, without querying a real session:

node -e "const d={model:{display_name:'exemple'},context_window:{used_percentage:42,context_window_size:1000000},cost:{total_cost_usd:0.87}}; console.log(d.context_window.context_window_size)"

The command returns 1000000, exactly the field a status line script would read on an extended context window model.

This reference point takes on its full meaning once the context approaches its limit, a signal that calls for the cleanup command described in the lesson on essential slash commands rather than blindly carrying on with the session.

Figure 1

The context window size shown by the status line

200000tokens
default context window
support.claude.com, article 8606394, 2026-09-02
1000000tokens
context window of the most recent Claude 5 models, including Sonnet 5
support.claude.com, article 8606394, 2026-09-02
The two values measure the size of the context_window.context_window_size field depending on the model family used in the session.
Figure 2

Task list behaviour by model family

Task list behaviour across two model familiesVisible by defaultHow to restore it if needed
Opus 4.7 and earlier modelsYes, with Ctrl+T to toggle the displayNothing to do, already active by default
Opus 4.8, Sonnet 5, Fable 5, Mythos 5 and more recent modelsNo, the list stays emptySet the environment variable CLAUDE_CODE_ENABLE_TODO_TOOLS=1
The table compares the default visibility of the task list and the gesture that restores it if needed, depending on the model family in session.
Calibrate it yourself

A developer works on Sonnet 5 during a multi step refactoring session. She watches the Claude Code screen and notices that the area usually reserved for the task list stays empty throughout the session.

Write in one sentence what this situation establishes, and in one sentence what it does not establish.

What to remember
  • On Opus 4.8, Sonnet 5, Fable 5, Mythos 5 and later versions, the task list stays empty by default because the tool that would fill it is not provided.
  • Setting the environment variable CLAUDE_CODE_ENABLE_TODO_TOOLS=1 before launching the session restores the task list on these recent models.
  • On earlier models such as Opus 4.7, Ctrl+T toggles the display of a list holding up to five tasks, persistent across compactions.
  • A custom status line receives a complete JSON object on its standard input, with the active model, context usage and the session cost.
  • The rate_limits block of a status line only appears for a Pro or Max subscription, or behind a gateway with a spending limit, and only after the first API response.
Do this now

Open your Claude Code status line during a running session, identify the active model and the percentage of context used that are shown there, then note whether the task list area is empty or filled on the model you are using.

Check the source

Every datable claim in this lesson links here to the public text behind it. A source that does not open proves nothing.