Skip to content
Lesson 11 of 1292% of the course

Build subagent rows for Claude Code

Design the subagentStatusLine in Statusline Studio: one row per running subagent with its name, status, model, context use and running time, installed next to your main status line.

Video coming soonBuild subagent rows for Claude CodeUntil then, the lesson below walks through every step.

When Claude Code hands work to subagents, like an Explore agent mapping a codebase, it can show a row for each one in the agent panel. What that row shows is up to you, with a second script set in subagentStatusLine. Statusline Studio builds it the same way it builds the main line.

Switch to subagent rows

At the top of Statusline Studio, the switch next to the preview has two modes:

  • Status line: the bar under your prompt (the statusLine setting)
  • Subagent rows: one row per running subagent (the subagentStatusLine setting)
Subagent rows have their own segments and templates.

Switch to Subagent rows. The segment list, the templates and the preview change to the subagent set. Your main status line is kept; switch back any time.

Pick the subagent segments

There are 15 segments for subagent rows:

SegmentWhat it shows
Agent name and agent typeWhich agent this is, like Explore
StatusWhether it is running, done or failed
Description and labelWhat it was asked to do
Task ID (short)A short id, to tell two agents of the same type apart
Model and reasoning effortWhich model it uses, and its effort if set
Token count, context used %, context window sizeHow much it has read so far
Running forHow long it has been working
Working directoryWhere it works, which differs from yours when it runs in its own worktree
Custom text / emoji, Fixed gapYour own text and spacing

Two hints the editor shows are worth knowing: Model is empty until the task picks a model, and Reasoning effort is empty when the subagent uses the session's effort.

Start from an agent template

Five templates are made for subagent rows:

TemplateThe look
Agent RowsName, state, model, context gauge
Agent CompactOne glance: who, how full, how long
Agent DetailA filled status chip plus what it is doing
Agent NerdNerd Font icons for every field
Agent ColumnsPadded so every row lines up

Rows sit on top of each other, so Columns is often the best line shape here: the names, gauges and times line up across agents. Subagent rows offer Flow and Columns.

Understand what is different

The subagent script gets one JSON object with a tasks array, one entry per subagent, and the terminal width:

{
  "tasks": [
    { "id": "t1", "name": "Explore", "agentType": "Explore", "status": "running",
      "tokenCount": 42150, "contextWindowSize": 200000, "cwd": "/home/you/Projects/app" }
  ],
  "columns": 80
}
The subagent script prints one line per row.

It prints one JSON line per row, {"id": ..., "content": ...}, so Claude Code knows which row belongs to which agent. The studio writes all of that; you only design the row.

Install it next to your status line

Copy install command works the same as for the main line, and saves the script as ~/.claude/subagent-statusline.sh (or .py, .js). It adds subagentStatusLine to ~/.claude/settings.json and leaves your statusLine alone, so both work side by side:

{
  "statusLine": { "type": "command", "command": "bash ~/.claude/statusline.sh", "padding": 0 },
  "subagentStatusLine": { "type": "command", "command": "bash ~/.claude/subagent-statusline.sh" }
}

Restart Claude Code and ask it for something that uses a subagent, like exploring a large folder, to see the rows.

The last lesson is about sharing: a link to your design, and one status line for a whole team.

Your progress stays in this browser only.
Contact