Skip to content

fix: ignore null agent colors#28004

Open
mturac wants to merge 1 commit into
anomalyco:devfrom
mturac:fix/27988-agent-null-color
Open

fix: ignore null agent colors#28004
mturac wants to merge 1 commit into
anomalyco:devfrom
mturac:fix/27988-agent-null-color

Conversation

@mturac
Copy link
Copy Markdown

@mturac mturac commented May 17, 2026

Issue for this PR

Closes #27988

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Agent markdown files can accidentally parse color: #9B59B6 as color: null, because YAML treats the #... part as a comment when the value is not quoted. That invalid color currently prevents the agent config from loading cleanly, which can make larger agent directories appear partially missing.

This PR treats a null agent color as unset during config normalization, so the agent still loads and keeps its prompt, mode, description, and other fields.

How did you verify your code works?

  • bun test test/config/config.test.ts -t "loads many agents"
  • bun typecheck
  • bun run lint packages/opencode/src/config/agent.ts packages/opencode/test/config/config.test.ts (0 errors; existing warnings in config.test.ts)
  • git diff --check origin/dev...HEAD
  • Push hook: bun turbo typecheck

Screenshots / recordings

Not applicable; config loading regression test covers the behavior.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent scanning from .opencode/agents/ silently drops files — only ~119 of 184 register

1 participant