chenhg5/cc-connect · error
config: %s.references.display_path has unsupported value %q
Error message
config: %s.references.display_path has unsupported value %q
What it means
CC-Connect validates `[projects.references].display_path` against a fixed set: "", "absolute", "relative", "basename", "dirname_basename", "smart". Any other value makes validateReferenceConfig reject the config, quoting the value. It controls how file paths in agent references are displayed.
Source
Thrown at config/config.go:1150
"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 nil
}
if len(u.Roles) == 0 {
return fmt.Errorf("config: %s.users has no roles defined", prefix)
}View on GitHub (pinned to 4000b2338a)
Solutions
- Use one of: "absolute", "relative", "basename", "dirname_basename", "smart", or empty string for default
- Prefer "smart" if unsure — it picks a sensible display per path
- Fix typos by copying a valid value exactly
Example fix
# before [projects.references] display_path = "short" # after [projects.references] display_path = "smart"
Defensive patterns
Strategy: validation
Validate before calling
var displayPaths = map[string]bool{"": true, "absolute": true, "relative": true, "basename": true, "dirname_basename": true, "smart": true}
if !displayPaths[strings.ToLower(strings.TrimSpace(rc.DisplayPath))] {
return fmt.Errorf("display_path %q unsupported", rc.DisplayPath)
} Type guard
func isValidDisplayPath(v string) bool {
switch strings.ToLower(strings.TrimSpace(v)) {
case "", "absolute", "relative", "basename", "dirname_basename", "smart":
return true
}
return false
} Prevention
- Default to "smart" or leave empty for the default behavior
- Keep the allowlist values in a lint script for config.toml
- Don't invent style names; copy from config.example.toml
When it happens
Trigger: Loading config.toml with display_path set to a non-allowlisted style, e.g. "short", "full", or "auto". Matching is case-insensitive and trimmed, so "Basename" would be accepted.
Common situations: Guessing style names instead of reading docs; typos like "dirbase"; switching from another tool whose path-display options used different vocabulary.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- config: %s.references.normalize_agents has unsupported value
- config: %s.references.render_platforms has unsupported value
- 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/b0c7210e2a4ea542.
Report an issue: GitHub.