{"record":{"id":"2966251ffb88b1ff","repo":"sipeed/picoclaw","slug":"channel-type-q-is-singleton-and-does-not-support","errorCode":null,"errorMessage":"channel type %q is singleton and does not support multiple instances, found %d enabled instances: %v","messagePattern":"channel type %q is singleton and does not support multiple instances, found (.+?) enabled instances: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/config_channel.go","lineNumber":529,"sourceCode":"func validateSingletonChannels(channels ChannelsConfig) error {\n\ttypeCount := make(map[string]int)\n\ttypeNames := make(map[string][]string)\n\tfor name, bc := range channels {\n\t\tif !bc.Enabled {\n\t\t\tcontinue\n\t\t}\n\t\tt := bc.Type\n\t\tif t == \"\" {\n\t\t\tt = name\n\t\t}\n\t\tif IsSingletonChannel(t) {\n\t\t\ttypeCount[t]++\n\t\t\ttypeNames[t] = append(typeNames[t], name)\n\t\t}\n\t}\n\tfor t, count := range typeCount {\n\t\tif count > 1 {\n\t\t\treturn fmt.Errorf(\n\t\t\t\t\"channel type %q is singleton and does not support multiple instances, found %d enabled instances: %v\",\n\t\t\t\tt,\n\t\t\t\tcount,\n\t\t\t\ttypeNames[t],\n\t\t\t)\n\t\t}\n\t}\n\treturn nil\n}\n\n// BaseFieldNames are JSON keys that belong to Channel, not to channel-specific settings.\nvar BaseFieldNames = map[string]struct{}{\n\t\"enabled\":              {},\n\t\"type\":                 {},\n\t\"allow_from\":           {},\n\t\"reasoning_channel_id\": {},\n\t\"group_trigger\":        {},\n\t\"typing\":               {},","sourceCodeStart":511,"sourceCodeEnd":547,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/config_channel.go#L511-L547","documentation":"Error \"channel type %q is singleton and does not support multiple instances, found %d enabled instances: %v\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/config/config_channel.go:529 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}