{"record":{"id":"7a4ca140e72f3e5a","repo":"chenhg5/cc-connect","slug":"config-s-references-normalize-agents-has-unsuppo","errorCode":null,"errorMessage":"config: %s.references.normalize_agents has unsupported value %q","messagePattern":"config: (.+?)\\.references\\.normalize_agents has unsupported value %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/config.go","lineNumber":1140,"sourceCode":"\t\"none\":  {},\n\t\"ascii\": {},\n\t\"emoji\": {},\n}\n\nvar supportedReferenceEnclosureStyles = map[string]struct{}{\n\t\"\":          {},\n\t\"none\":      {},\n\t\"bracket\":   {},\n\t\"angle\":     {},\n\t\"fullwidth\": {},\n\t\"code\":      {},\n}\n\nfunc validateReferenceConfig(prefix string, rc ReferenceConfig) error {\n\tfor _, v := range rc.NormalizeAgents {\n\t\tkey := strings.ToLower(strings.TrimSpace(v))\n\t\tif _, ok := supportedReferenceAgents[key]; !ok {\n\t\t\treturn fmt.Errorf(\"config: %s.references.normalize_agents has unsupported value %q\", prefix, v)\n\t\t}\n\t}\n\tfor _, v := range rc.RenderPlatforms {\n\t\tkey := strings.ToLower(strings.TrimSpace(v))\n\t\tif _, ok := supportedReferencePlatforms[key]; !ok {\n\t\t\treturn fmt.Errorf(\"config: %s.references.render_platforms has unsupported value %q\", prefix, v)\n\t\t}\n\t}\n\tif _, ok := supportedReferenceDisplayPaths[strings.ToLower(strings.TrimSpace(rc.DisplayPath))]; !ok {\n\t\treturn fmt.Errorf(\"config: %s.references.display_path has unsupported value %q\", prefix, rc.DisplayPath)\n\t}\n\tif _, ok := supportedReferenceMarkerStyles[strings.ToLower(strings.TrimSpace(rc.MarkerStyle))]; !ok {\n\t\treturn fmt.Errorf(\"config: %s.references.marker_style has unsupported value %q\", prefix, rc.MarkerStyle)\n\t}\n\tif _, ok := supportedReferenceEnclosureStyles[strings.ToLower(strings.TrimSpace(rc.EnclosureStyle))]; !ok {\n\t\treturn fmt.Errorf(\"config: %s.references.enclosure_style has unsupported value %q\", prefix, rc.EnclosureStyle)\n\t}\n\treturn nil","sourceCodeStart":1122,"sourceCodeEnd":1158,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/config/config.go#L1122-L1158","documentation":"CC-Connect validates the `[projects.references].normalize_agents` list against a fixed allowlist (\"all\", \"codex\", \"claudecode\") at config load time. Any entry outside the allowlist makes validateReferenceConfig reject the config, quoting the offending value.","triggerScenarios":"Loading config.toml where normalize_agents contains an agent name not in the allowlist, e.g. normalize_agents = [\"gemini\"] or a misspelled \"claduecode\". Matching is case-insensitive and whitespace-trimmed, so casing is not the issue — only the name itself.","commonSituations":"Assuming all registered agents are reference-normalizable; typos; referencing an agent added in a newer/older cc-connect version where the allowlist differs.","solutions":["Use only \"all\", \"codex\", or \"claudecode\" in normalize_agents","Fix the typo by comparing against the supported list in the error docs","Remove the unsupported entry; use [\"all\"] to cover every supported agent"],"exampleFix":"# before\n[projects.references]\nnormalize_agents = [\"gemini\"]\n\n# after\n[projects.references]\nnormalize_agents = [\"all\"]","handlingStrategy":"validation","validationCode":"var supportedRefAgents = map[string]bool{\"all\": true, \"codex\": true, \"claudecode\": true}\nfor _, v := range refs.NormalizeAgents {\n    if !supportedRefAgents[strings.ToLower(strings.TrimSpace(v))] {\n        return fmt.Errorf(\"normalize_agents entry %q unsupported\", v)\n    }\n}","typeGuard":"func isSupportedRefAgent(v string) bool {\n    switch strings.ToLower(strings.TrimSpace(v)) {\n    case \"all\", \"codex\", \"claudecode\":\n        return true\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Use [\"all\"] unless you specifically need to restrict to codex/claudecode","Check the supportedReferenceAgents allowlist in config/config.go when in doubt","Pin cc-connect version and re-check allowlists after upgrades"],"tags":["config","validation","allowlist"],"backgroundTag":"unsupported-config-value","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}