claude-code - 💡(How to fix) Fix Support `color` field in agent frontmatter [1 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#47873Fetched 2026-04-15 06:39:53
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×3closed ×1commented ×1

Code Example

---
name: my-agent
color: red
---
RAW_BUFFERClick to expand / collapse

It would be useful to set a session color in .claude/agents/<name>.md frontmatter:

---
name: my-agent
color: red
---

When launched via claude --agent <name>, the session would automatically apply that color (same as /color <color>). This saves a manual step and makes it easy to visually distinguish different agent sessions.

extent analysis

TL;DR

To set a session color for an agent, add a color property to the agent's frontmatter in the .claude/agents/<name>.md file.

Guidance

  • Add a color property to the frontmatter of the agent's markdown file, as shown in the example: color: red.
  • Verify that the claude --agent <name> command applies the specified color to the session.
  • Check the documentation for supported color values and formats.
  • Test the feature with different agents and colors to ensure consistency.

Example

---
name: my-agent
color: blue
---

Notes

This solution assumes that the claude command supports reading frontmatter properties from the agent's markdown file. If this is not the case, additional configuration or development may be required.

Recommendation

Apply workaround: Add the color property to the agent's frontmatter, as this provides a straightforward way to set the session color without requiring additional development or configuration.

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