feat: Add agent color config
This PR adds the ability to customize agent colors in the opencode configuration.
You can specify custom colors for agents in your opencode.json:
{
$schema: https://opencode.ai/config.json,
agent: {
glm-4.6: {
model: openrouter/zhipuai/glm-4-plus,
color: #3B82F6,
...
},
chkn: {
model: openrouter/gpt-5-high,
color: #DC2626,
...
},
plan: {
model: openrouter/gpt-5-high,
mode: primary,
color: #A855F7,
...
},
claude: {
model: anthropic/claude-sonnet-4-5-20250929,
color: #D97706,
...
}
}
}
The colors are specified as hex color codes and will be applied to agent indicators in the CLI/TUI output, making it easier to distinguish between different agent types at a glance.
Relates to issue https://github.com/sst/opencode/issues/1973
@0xrin1 can u resolve the conflicts?
@rekram1-node done. thanks. the tests too i suppose?
@0xrin1 I was about to merge but then I realized, how are people gonna define colors in an agent.md definition?
@0xrin1 I was about to merge but then I realized, how are people gonna define colors in an agent.md definition?
Not exactly sure what you mean.
Do you mean that we should be supporting a way to specify agent color in agent.md?
I'm not sure what that would look like tbh is that something ppl would do?
i mean u can define agents in your opencode.json right
but u can also define them in .opencode/agent/
Using the frontmatter
oh I guess it works if you wrap it in quotes so this is fine
Thanks for having patience with me on this one! A lot of people wanted this
@rekram1-node thank you too 🫡
I'm not seeing this in the dev branch, not sure what's happened. d0ead04 also shows me this label:
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Any ideas?
Very keen to use this feature, nice work folks :)
there is a chance that it was merged right when a deploy script went off and it killed the commit ill recover it and merge it in again thansk for pointing it out
it's backkkk: 0b86adbe997320c1a13e91899cace1ddd956a39a