Status line: expose active agents and connected MCP servers in stdin JSON
Feature Request
Summary
Add active agent invocations and connected MCP server state to the status line stdin JSON, so custom status line scripts can display real-time session state.
Current behaviour
The stdin JSON passed to statusLine.command contains:
model(display name, id)context_window.used_percentagecost.total_cost_usdworkspace.current_dir
It does not contain which agents have been invoked or which MCP servers are actually connected.
Desired behaviour
Add two fields to the stdin JSON:
{
"agents": {
"available": ["sustainable-coder", "reviewer"],
"active": ["sustainable-coder"]
},
"mcp": {
"configured": ["gmail", "n8n", "ide"],
"connected": ["n8n", "ide"]
}
}
agents.available— agents loadable from~/.claude/agents/and project.claude/agents/agents.active— agents currently invoked/running in this sessionmcp.configured— servers inmcp.jsonmcp.connected— servers that successfully connected at session start
Why this matters
Custom status lines (via statusLine.command) are a powerful way to surface session state in the terminal. Right now scripts can only approximate this by listing config files — they can't distinguish a connected MCP from a broken one, or know if an agent is currently running.
This would enable status lines like:
MINAI | claude-sonnet-4-6 | ctx:42% | $0.18
agents:sustainable-coder(active) | mcp:n8n✓ ide✓ gmail✗
Workaround
Currently listing all files in ~/.claude/agents/ and all keys in mcp.json as an approximation. Works for configured state, not actual connection/activity state.
🤖 Submitted via Claude Code
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗