chenhg5/cc-connect · error

config: relay.timeout_secs must be >= 0

Error message

config: relay.timeout_secs must be >= 0

What it means

Configuration validation rejects a relay.timeout_secs value that is negative. It is a sentinel validation error in validateInternal: the faulting input is a config file (or override) with relay.timeout_secs < 0; only 0 (disabled) or a positive second count is accepted.

Source

Thrown at config/config.go:1016

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 == "" {
			return fmt.Errorf("config: %s.agent.type is required", prefix)
		}
		if len(proj.Platforms) == 0 && !permissive {

View on GitHub (pinned to 4000b2338a)

Solutions

  1. Set relay.timeout_secs to 0 or a positive number of seconds
  2. Remove the key to use the default timeout
Defensive patterns

Strategy: validation

When it happens

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

Common situations: See trigger scenarios.

Understand the failure class


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