sipeed/picoclaw · error

failed to start any enabled channels

Error message

failed to start any enabled channels: %w

What it means

Returned by the manager's Start when some but not all enabled channels failed: it wraps the collected per-channel start errors under 'failed to start any enabled channels'. Indicates partial channel availability — the failed channels' names were logged and their errors are joined here.

Solutions

  1. Unwrap the joined errors to see each channel's failure reason
  2. Fix or disable the failing channels individually
  3. Restart the manager once configurations are corrected
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at pkg/channels/manager.go:1286 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/5af91e4da77be918. Report an issue: GitHub.

Appendix: source

Thrown at pkg/channels/manager.go:1286

	if len(m.channels) > 0 && len(m.workers) == 0 {
		if m.dispatchTask != nil {
			m.dispatchTask.cancel()
			m.dispatchTask = nil
		}

		sort.Strings(failedNames)
		if len(failedStarts) == 0 {
			return fmt.Errorf("failed to start any enabled channels")
		}

		logger.ErrorCF("channels", "All enabled channels failed to start", map[string]any{
			"failed":          len(failedNames),
			"total":           len(m.channels),
			"failed_channels": failedNames,
		})

		return fmt.Errorf("failed to start any enabled channels: %w", errors.Join(failedStarts...))
	}

	if len(failedNames) > 0 {
		sort.Strings(failedNames)
		logger.WarnCF("channels", "Some channels failed to start", map[string]any{
			"failed":          len(failedNames),
			"started":         len(m.workers),
			"total":           len(m.channels),
			"failed_channels": failedNames,
		})
	}

	// Start the dispatcher that reads from the bus and routes to workers
	go m.dispatchOutbound(dispatchCtx)
	go m.dispatchOutboundMedia(dispatchCtx)

	// Start the TTL janitor that cleans up stale typing/placeholder entries
	go m.runTTLJanitor(dispatchCtx)

View on GitHub (pinned to 49183d7e8d)