[FEATURE] statusLine payload: expose the focused subagent view's model/effort (and repaint on view switch)
Feature request
When I open a background subagent's view in the TUI, the custom status line keeps showing the main session's model and effort. I'd like the status line to reflect the agent I'm looking at.
Current behavior (v2.1.282, Windows)
- The statusLine JSON payload's
modelandeffort.levelcome from the main loop's model and effort, andtranscript_path/context_windowcome from the main conversation — whichever view is on screen. agent.nameis the session's main-thread agent type (--agent), not the viewed subagent.- Switching to or from a subagent view does not trigger a status line repaint, so even a script that could work out which agent is on screen wouldn't be re-run.
Proposal
When a subagent view is focused, add a field for it to the payload, for example:
"viewed_agent": {
"id": "a52bc7c6…",
"type": "bug-audit",
"model": { "id": "claude-opus-5-5", "display_name": "Opus 5.5" },
"effort": { "level": "xhigh" },
"transcript_path": "…/subagents/agent-a52bc7c6….jsonl"
}
(omitted when the main conversation is in view), and repaint the status line when the focused view changes.
Why
Subagents often run a different model or effort than the main loop, from agent-definition frontmatter or a per-call model:. Being able to see what an agent is actually running at while watching it is the quickest way to spot a misconfiguration, such as an agent definition whose effort: isn't being applied. The data already exists: each subagent transcript records message.model and effort on every assistant record. It just isn't exposed to the status line for the focused view.
Workaround today
A status line script can list all running subagents by reading <project>/<session>/subagents/agent-*.jsonl and the *.meta.json beside each one. That works, but it can't highlight the one you're looking at.