sipeed/picoclaw · error
channel
Error message
channel %s: %w
What it means
Sentinel-style wrapper in the channel manager's startup loop that aggregates a channel's Start failure into a 'channel %s: %w' error. It fires for each named channel whose Start returned an error, contributing to failedStarts which may later surface as a total startup failure.
Solutions
- Read the wrapped error to see why that specific channel failed to start
- Fix the channel's own configuration (credentials, ports, paths) before restarting
- Check the failed_channels list in the aggregate error
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at pkg/channels/manager.go:1245 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/357e3da8b23e06b9.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/channels/manager.go:1245
failedNames := make([]string, 0, len(m.channels))
for name, channel := range m.channels {
logger.InfoCF("channels", "Starting channel", map[string]any{
"channel": name,
})
if err := channel.Start(ctx); err != nil {
logger.ErrorCF("channels", "Failed to start channel", map[string]any{
"channel": name,
"error": err.Error(),
})
m.publishChannelEvent(
runtimeevents.KindChannelLifecycleStartFailed,
name,
runtimeevents.Scope{Channel: name},
runtimeevents.SeverityError,
ChannelLifecyclePayload{Type: channelTypeForEvent(m, name), Error: err.Error()},
)
failedStarts = append(failedStarts, fmt.Errorf("channel %s: %w", name, err))
failedNames = append(failedNames, name)
continue
}
// Lazily create worker only after channel starts successfully
channelType := name
if m.config != nil {
if bc := m.config.Channels.Get(name); bc != nil && bc.Type != "" {
channelType = bc.Type
}
}
w := newChannelWorker(name, channel, channelType)
m.workers[name] = w
go m.runWorker(dispatchCtx, name, w)
go m.runMediaWorker(dispatchCtx, name, w)
m.publishChannelEvent(
runtimeevents.KindChannelLifecycleStarted,
name,
runtimeevents.Scope{Channel: name},View on GitHub (pinned to 49183d7e8d)