Customize your status line changedstatusline
Nearest release: v2.1.323, published 9 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 13 Nov 2026 05:47 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 13 Nov 2026 06:07 UTC.
Upstream edited
Recorded here
Lines+0added
Lines−40removed
From line
1,081
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits44to this page, all time
## Subagent status lines ### Task fields
The whole hunk
from line 1081, old and new numbered
/
from line 1081
10811081echo "$dirname [$model]"
10821082```
10831083
1084## Subagent status lines
1085
1086The `subagentStatusLine` setting renders a custom row body for each [subagent](https://code.claude.com/docs/en/sub-agents.md) shown in the agent panel below the prompt. Use it to replace the default `name · description · token count` row with your own formatting.
1087
1088```json theme={null}
1089{
1090 "subagentStatusLine": {
1091 "type": "command",
1092 "command": "~/.claude/subagent-statusline.sh"
1093 }
1094}
1095```
1096
1097The command runs once per refresh tick and receives all visible subagent rows as a single JSON object on stdin. The input includes the [base hook fields](https://code.claude.com/docs/en/hooks.md#common-input-fields), a `columns` field with the usable row width, and a `tasks` array with one entry per row, described in [Task fields](#task-fields).
1098
1099Write one JSON line to stdout per row you want to override, in the form `{"id": "<task id>", "content": "<row body>"}`. The `content` string is rendered as-is, including ANSI colors and OSC 8 hyperlinks. Omit a task's `id` to keep the default rendering for that row; emit an empty `content` string to hide it.
1100
1101The same trust, `disableAllHooks`, and [`allowManagedHooksOnly`](https://code.claude.com/docs/en/settings-reference#allowmanagedhooksonly) gates that apply to `statusLine` apply here. Plugins can ship a default `subagentStatusLine` in their [`settings.json`](https://code.claude.com/docs/en/plugins/manifest-reference#standard-layout), but unlike hooks, plugin values don't run under `allowManagedHooksOnly` even when the plugin is force-enabled in managed settings `enabledPlugins`.
1102
1103### Task fields
1104
1105Each entry in the `tasks` array describes one subagent row with the fields below. Fields marked optional are omitted when they have no value, so guard for their absence in your script.
1106
1107| Field | Type | Description |
1108| :- | :- | :- |
1109| `id` | string | Identifier of the task. Echo it as `id` in the line you write back for this row |
1110| `name` | string, optional | Name the subagent is [addressed by](https://code.claude.com/docs/en/sub-agents.md#subagent-names), when it has one |
1111| `type` | string | Kind of task: `local_agent` |
1112| `agentType` | string | Subagent type the task runs as, such as the built-in [`Explore`](https://code.claude.com/docs/en/sub-agents#built-in-subagents) or a custom `code-reviewer`. Holds the same value that hooks receive as [`agent_type`](https://code.claude.com/docs/en/hooks#subagentstart). Requires Claude Code v2.1.293 or later |
1113| `status` | string | State of the task, such as `running`, `completed`, `failed`, or `killed` |
1114| `description` | string | Short description of the task, such as the one Claude gave when it spawned the subagent |
1115| `label` | string | Short progress summary of the task when Claude Code has one, otherwise the same text as `description` |
1116| `startTime` | number | When the task started, in milliseconds since the Unix epoch |
1117| `model` | string, optional | ID of the resolved model the task runs on. Omitted until the model is resolved |
1118| `effort` | string or number, optional | Reasoning effort set for the subagent in its [definition frontmatter](https://code.claude.com/docs/en/sub-agents.md#supported-frontmatter-fields) or on the individual invocation: `low`, `medium`, `high`, `xhigh`, `max`, or a numeric token budget. This is the configured value, and the effort Claude Code applies can differ when the model doesn't support that level. Omitted when no effort is set |
1119| `contextWindowSize` | number, optional | Context window of `model` in tokens, computed the same way as the main status line's [`context_window.context_window_size`](#context-window-fields), so you can render a per-row percentage from `tokenCount`. Omitted when `model` is |
1120| `tokenCount` | number | Running token count of the subagent, the figure the default row shows |
1121| `tokenSamples` | array of numbers | Up to the last 16 `tokenCount` readings, one per refresh tick, oldest first and ending with the current one |
1122| `cwd` | string | Working directory of the subagent: its own directory when it runs in one, such as an isolated worktree, otherwise the session's working directory |
1123
11241084## Tips
11251085
11261086* **Test with mock input**: `echo '{"model":{"display_name":"Opus"},"workspace":{"current_dir":"/home/user/project"},"context_window":{"used_percentage":25},"session_id":"test-session-abc"}' | ./statusline.sh`
No line in this hunk matches that.