chenhg5/cc-connect · error
config: relay.visibility must be "full", "summary", or "none
Error message
config: relay.visibility must be "full", "summary", or "none"
What it means
The config validator rejects an unsupported value for the relay.visibility setting. Only "full", "summary", or "none" (any case, with surrounding whitespace trimmed; empty string is allowed and means default) are accepted. This error is thrown during config validation in config/config.go before the engine starts, because relay visibility controls how much agent output is relayed to messaging platforms and an unknown value would silently break that behavior.
Source
Thrown at config/config.go:1021
return c.validateInternal(false)
}
func (c *Config) validateInternal(permissive bool) error {
if err := validateDisplayConfig("display", &c.Display); err != nil {
return err
}
switch strings.ToLower(strings.TrimSpace(c.AttachmentSend)) {
case "", "on", "off":
default:
return fmt.Errorf("config: attachment_send must be \"on\" or \"off\"")
}
if c.Relay.TimeoutSecs != nil && *c.Relay.TimeoutSecs < 0 {
return fmt.Errorf("config: relay.timeout_secs must be >= 0")
}
switch strings.ToLower(strings.TrimSpace(c.Relay.Visibility)) {
case "", "full", "summary", "none":
default:
return fmt.Errorf("config: relay.visibility must be \"full\", \"summary\", or \"none\"")
}
if len(c.Projects) == 0 {
return fmt.Errorf("config: at least one [[projects]] entry is required")
}
for i, proj := range c.Projects {
prefix := fmt.Sprintf("projects[%d]", i)
if proj.Name == "" {
return fmt.Errorf("config: %s.name is required", prefix)
}
if proj.Agent.Type == "" {
return fmt.Errorf("config: %s.agent.type is required", prefix)
}
if len(proj.Platforms) == 0 && !permissive {
return fmt.Errorf("config: %s needs at least one [[projects.platforms]]", prefix)
}
for j, p := range proj.Platforms {
if p.Type == "" {
return fmt.Errorf("config: %s.platforms[%d].type is required", prefix, j)View on GitHub (pinned to 4000b2338a)
Solutions
- Open config.toml and change relay.visibility to one of "full", "summary", or "none" (case-insensitive)
- Remove the visibility line entirely to use the default (empty string is accepted)
- Run the config through the validator again (restart cc-connect) to confirm it loads
- Check config.example.toml for documented values
Example fix
// before [relay] visibility = "verbose" // after [relay] visibility = "summary"
Defensive patterns
Strategy: validation
Validate before calling
v := strings.ToLower(strings.TrimSpace(cfg.Relay.Visibility))
if v != "" && v != "full" && v != "summary" && v != "none" {
return fmt.Errorf("relay.visibility %q not in full/summary/none", cfg.Relay.Visibility)
} Prevention
- Only copy visibility values from config.example.toml or docs
- Keep a CI step that loads config.toml before deploying
- Never hand-translate setting values; use the exact enum strings
When it happens
Trigger: Calling Load/Validate with a TOML config where [relay] visibility is set to any string other than "full", "summary", "none", or empty — e.g. visibility = "verbose", "on", "true", "summarized", or a typo like "summery".
Common situations: Users copying example configs from another project, guessing at allowed values, upgrading from an older version that used different visibility names, or using a localized value like "完整".
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
- tmux: 'session' option is required (name of the tmux session
- config: at least one [[projects]] entry is required
- config: %s.name is required
- config: %s.agent.type is required
- config: %s needs at least one [[projects.platforms]]
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/8cf6304d18fea53e.
Report an issue: GitHub.