multica-ai/multica · error

poll_interval must be positive (got %s); use `config set pol

Error message

poll_interval must be positive (got %s); use `config set poll_interval ""` to clear it

What it means

poll_interval accepts only strictly positive durations. '0s' and negative values are rejected deliberately: the daemon's resolver only substitutes strictly positive values, so persisting '0s' would display as configured in `config show` while being silently ignored at daemon start (the trap from issue #3824's review). Empty string is the only way to clear the persisted value.

Source

Thrown at server/cmd/multica/cmd_config.go:205

		}
		cfg.MaxConcurrentTasks = n
	case "poll_interval":
		if value == "" {
			cfg.PollInterval = ""
			return nil
		}
		d, err := time.ParseDuration(value)
		if err != nil {
			return fmt.Errorf("poll_interval must be a Go duration (e.g. 10s, 500ms): %w", err)
		}
		// Reject zero and negative durations. Persisting "0s" would look
		// configured in `config show` but be silently ignored at daemon
		// start (the resolver only substitutes strictly positive values),
		// which is exactly the trap reported in #3824's review. Empty
		// string is the one and only way to clear a previously persisted
		// value.
		if d <= 0 {
			return fmt.Errorf("poll_interval must be positive (got %s); use `config set poll_interval \"\"` to clear it", d)
		}
		cfg.PollInterval = value
	case "heartbeat_interval":
		if err := assignPositiveDuration(&cfg.HeartbeatInterval, key, value); err != nil {
			return err
		}
	case "agent_timeout":
		// agent_timeout is the one duration knob where "0s" is a
		// meaningful persisted value (it explicitly disables the
		// wall-clock cap; see cli.CLIConfig.AgentTimeout). Store the raw
		// string via a pointer so we can distinguish "not set" (nil)
		// from "disabled" (non-nil, "0s") and any positive value.
		if value == "" {
			cfg.AgentTimeout = nil
			return nil
		}
		d, err := time.ParseDuration(value)
		if err != nil {

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. To clear the override and fall back to the default: `multica config set poll_interval ""`.
  2. To slow polling instead of disabling it, set a large positive value (e.g. 1h).
  3. If you truly need polling disabled, look for a dedicated disable flag in `config show`/docs rather than zeroing the interval.

Example fix

# before
multica config set poll_interval 0s
# after (clear the persisted override)
multica config set poll_interval ""
Defensive patterns

Strategy: validation

Validate before calling

# reject zero/negative and translate 'disable' into a clear
if [ "$VAL" = "0s" ] || [[ "$VAL" == -* ]]; then VAL=""; fi
multica config set poll_interval "$VAL"

Prevention

When it happens

Trigger: `multica config set poll_interval 0s`, `... -5s`, or `... 0ms` intending to disable polling.

Common situations: Trying to 'turn off' polling by setting zero; copy-pasting a zero default from a template; sign errors in computed durations.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/802c433ee9528784. Report an issue: GitHub.