multica-ai/multica · error

%s must be positive (got %s); use `config set %s ""` to clea

Error message

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

What it means

assignPositiveDuration rejects parsed durations <= 0 (e.g. '0s', '-1ms') for every daemon duration knob it serves. Zero is rejected for the same reason as poll_interval: the daemon resolver only substitutes strictly positive values, so a persisted zero would look configured but be ignored; empty string is the sole way to clear.

Source

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

	return nil
}

// assignPositiveDuration parses value as a strictly-positive Go duration
// and writes the raw string into dst. Shared by every persisted daemon
// duration knob except agent_timeout, whose zero value is meaningful.
// Empty string clears the field.
func assignPositiveDuration(dst *string, key, value string) error {
	if value == "" {
		*dst = ""
		return nil
	}
	normalized := strings.TrimSpace(value)
	d, err := time.ParseDuration(normalized)
	if err != nil {
		return fmt.Errorf("%s must be a Go duration (e.g. 10s, 500ms): %w", key, err)
	}
	if d <= 0 {
		return fmt.Errorf("%s must be positive (got %s); use `config set %s \"\"` to clear it", key, d, key)
	}
	*dst = normalized
	return nil
}

// agentTimeoutDisplay renders the tri-state agent_timeout value for
// `config show`. nil = not persisted (fall through to env/default);
// non-nil "0s" = explicitly disabled; any other non-nil = the persisted
// duration string.
func agentTimeoutDisplay(v *string) string {
	if v == nil {
		return "(not set)"
	}
	if *v == "" {
		return "(not set)"
	}
	if d, err := time.ParseDuration(*v); err == nil && d == 0 {
		return *v + " (disabled)"

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Clear the override instead of zeroing: `multica config set <key> ""`.
  2. Set a large positive value if the goal is 'rarely'.
  3. For a real disable, check for a dedicated disable_* toggle rather than zeroing the interval.

Example fix

# before
multica config set heartbeat_interval 0s
# after
multica config set heartbeat_interval ""
Defensive patterns

Strategy: validation

Validate before calling

# translate 'disable' into a clear, never a zero
if [ "$VAL" = "0s" ] || [[ "$VAL" == -* ]]; then VAL=""; fi
multica config set heartbeat_interval "$VAL"

Prevention

When it happens

Trigger: `multica config set heartbeat_interval 0s`, `... auto_update_check_interval -1h`, or `... codex_handshake_timeout 0ms`.

Common situations: Attempting to disable a behavior by zeroing its interval; negative computed durations in automation.

Related errors


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