claude-code - 💡(How to fix) Fix Expose active skills and running subagents in statusline JSON data [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47857Fetched 2026-04-15 06:40:21
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2closed ×1

Code Example

{
  "active_skill": {
    "name": "craft-site"
  },
  "subagents": [
    { "name": "craft-planner", "status": "running" },
    { "name": "Explore", "status": "running" }
  ]
}
RAW_BUFFERClick to expand / collapse

Problem

The statusline API currently exposes agent.name for the primary agent of a session, but does not surface:

  1. Active skill — when a skill is invoked via the Skill tool, there's no field in the statusline JSON indicating which skill is running
  2. Running subagents — when subagents are spawned via the Agent tool (e.g. subagent_type: "Explore", custom agents), there's no visibility into which ones are active, their names, or their status

This limits what custom statuslines can display. The only agent-related field available is agent.name, which only reflects the primary session agent (set via --agent flag), not dynamically spawned subagents.

Proposed solution

Add two new fields to the statusline JSON payload:

{
  "active_skill": {
    "name": "craft-site"
  },
  "subagents": [
    { "name": "craft-planner", "status": "running" },
    { "name": "Explore", "status": "running" }
  ]
}
  • active_skill — present only when a skill is currently loaded/executing, null or absent otherwise
  • subagents — array of currently running subagents with their name/type and status (running, completed, etc.)

Use case

Custom statuslines that show real-time session state. For example, displaying which skill is guiding the current response, or showing that background agents are working — so users know what's happening without reading the full output stream.

extent analysis

TL;DR

To address the limitation, add active_skill and subagents fields to the statusline JSON payload to provide visibility into the active skill and running subagents.

Guidance

  • Review the proposed solution to add active_skill and subagents fields to the statusline JSON payload to determine if it meets the requirements.
  • Consider the implications of adding these new fields on existing custom statuslines and their potential impact on user experience.
  • Evaluate the proposed JSON structure for active_skill and subagents to ensure it is consistent with the existing statusline API.
  • Assess the potential need for additional error handling or edge cases, such as when no skill is active or no subagents are running.

Example

{
  "active_skill": {
    "name": "craft-site"
  },
  "subagents": [
    { "name": "craft-planner", "status": "running" },
    { "name": "Explore", "status": "running" }
  ]
}

This example illustrates the proposed JSON structure for the new fields.

Notes

The proposed solution assumes that the statusline API can be modified to include the new fields. However, the issue does not provide information on the underlying implementation or potential constraints that may affect the feasibility of this solution.

Recommendation

Apply workaround: Add the proposed active_skill and subagents fields to the statusline JSON payload, as it provides a clear and structured approach to addressing the limitation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING