chenhg5/cc-connect · error
config: %s.references.render_platforms has unsupported value
Error message
config: %s.references.render_platforms has unsupported value %q
What it means
CC-Connect validates the `[projects.references].render_platforms` list against a fixed allowlist ("all", "feishu", "weixin") at config load time. Any unsupported platform name causes validateReferenceConfig to reject the config, quoting the offending value.
Source
Thrown at config/config.go:1146
"": {},
"none": {},
"bracket": {},
"angle": {},
"fullwidth": {},
"code": {},
}
func validateReferenceConfig(prefix string, rc ReferenceConfig) error {
for _, v := range rc.NormalizeAgents {
key := strings.ToLower(strings.TrimSpace(v))
if _, ok := supportedReferenceAgents[key]; !ok {
return fmt.Errorf("config: %s.references.normalize_agents has unsupported value %q", prefix, v)
}
}
for _, v := range rc.RenderPlatforms {
key := strings.ToLower(strings.TrimSpace(v))
if _, ok := supportedReferencePlatforms[key]; !ok {
return fmt.Errorf("config: %s.references.render_platforms has unsupported value %q", prefix, v)
}
}
if _, ok := supportedReferenceDisplayPaths[strings.ToLower(strings.TrimSpace(rc.DisplayPath))]; !ok {
return fmt.Errorf("config: %s.references.display_path has unsupported value %q", prefix, rc.DisplayPath)
}
if _, ok := supportedReferenceMarkerStyles[strings.ToLower(strings.TrimSpace(rc.MarkerStyle))]; !ok {
return fmt.Errorf("config: %s.references.marker_style has unsupported value %q", prefix, rc.MarkerStyle)
}
if _, ok := supportedReferenceEnclosureStyles[strings.ToLower(strings.TrimSpace(rc.EnclosureStyle))]; !ok {
return fmt.Errorf("config: %s.references.enclosure_style has unsupported value %q", prefix, rc.EnclosureStyle)
}
return nil
}
// validateUsersConfig checks the [projects.users] section for consistency.
func validateUsersConfig(prefix string, u *UsersConfig) error {
if u == nil {
return nilView on GitHub (pinned to 4000b2338a)
Solutions
- Use only "all", "feishu", or "weixin" in render_platforms
- Remove entries for platforms that don't support reference rendering
- Use ["all"] to render on every supported platform
Example fix
# before [projects.references] render_platforms = ["telegram"] # after [projects.references] render_platforms = ["all"]
Defensive patterns
Strategy: validation
Validate before calling
var supportedRefPlatforms = map[string]bool{"all": true, "feishu": true, "weixin": true}
for _, v := range refs.RenderPlatforms {
if !supportedRefPlatforms[strings.ToLower(strings.TrimSpace(v))] {
return fmt.Errorf("render_platforms entry %q unsupported", v)
}
} Type guard
func isSupportedRefPlatform(v string) bool {
switch strings.ToLower(strings.TrimSpace(v)) {
case "all", "feishu", "weixin":
return true
}
return false
} Prevention
- Remember render_platforms is a smaller allowlist than the set of configurable platforms
- Use ["all"] and restrict later only if needed
- Verify platform names against supportedReferencePlatforms in config/config.go
When it happens
Trigger: Loading config.toml where render_platforms contains a platform not in the allowlist, e.g. render_platforms = ["telegram"] or "discord" — even if that platform is configured elsewhere in the file. Comparison is case-insensitive and trimmed.
Common situations: Expecting reference rendering to support every configured platform; typos like "feishu2"; copying entries between render_platforms and other platform lists that do have different allowlists.
Related errors
- config: %s.references.normalize_agents has unsupported value
- config: %s.references.display_path has unsupported value %q
- config: %s.references.marker_style has unsupported value %q
- config: %s.references.enclosure_style has unsupported value
- tmux: 'session' option is required (name of the tmux session
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/9feeb02bac5f64dc.
Report an issue: GitHub.