chenhg5/cc-connect · error

config: attachment_send must be "on" or "off"

Error message

config: attachment_send must be "on" or "off"

What it means

validateInternal rejects attachment_send when set to anything other than "on", "off", or unset. Fires at config load for typos like "true", "yes", or "enable" — the field is a strict on/off switch, not a boolean.

Source

Thrown at config/config.go:1013

// validatePermissive is like validate but skips the "at least one platform"
// requirement so that commands like `cc-connect web` can operate on agent-only
// configs before platforms have been set up.
func (c *Config) validatePermissive() error {
	return c.validateInternal(true)
}

func (c *Config) validate() error {
	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 == "" {

View on GitHub (pinned to 4000b2338a)

Solutions

  1. Set attachment_send = "on" or "off" in config.toml
  2. Remove the key to keep the default (empty = on)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at config/config.go:1013 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06). Data as JSON: /api/errors/1adb27268d9d8b52. Report an issue: GitHub.