{"record":{"id":"de60572c03c1fc21","repo":"sipeed/picoclaw","slug":"invalid-chat-id-s-w","errorCode":null,"errorMessage":"invalid chat ID %s: %w","messagePattern":"invalid chat ID (.+?): %w","errorType":"validation","errorClass":"ErrSendFailed","httpStatus":null,"severity":"error","filePath":"pkg/channels/telegram/telegram.go","lineNumber":227,"sourceCode":"\t\tc.progress.StopAll()\n\t}\n\tif c.commandRegCancel != nil {\n\t\tc.commandRegCancel()\n\t}\n\n\treturn nil\n}\n\nfunc (c *TelegramChannel) Send(ctx context.Context, msg bus.OutboundMessage) ([]string, error) {\n\tif !c.IsRunning() {\n\t\treturn nil, channels.ErrNotRunning\n\t}\n\n\tuseMarkdownV2 := c.tgCfg.UseMarkdownV2\n\n\tchatID, threadID, err := resolveTelegramOutboundTarget(msg.ChatID, &msg.Context)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid chat ID %s: %w\", msg.ChatID, channels.ErrSendFailed)\n\t}\n\n\tif msg.Content == \"\" {\n\t\treturn nil, nil\n\t}\n\n\tisToolFeedback := outboundMessageIsToolFeedback(msg)\n\ttoolFeedbackContent := msg.Content\n\tif isToolFeedback {\n\t\ttoolFeedbackContent = fitToolFeedbackForTelegram(msg.Content, useMarkdownV2, 4096)\n\t}\n\ttrackedChatID := telegramToolFeedbackChatKey(msg.ChatID, &msg.Context)\n\tif isToolFeedback {\n\t\tif msgID, handled, err := c.progress.Update(ctx, trackedChatID, toolFeedbackContent); handled {\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn []string{msgID}, nil","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/telegram/telegram.go#L209-L245","documentation":"Error \"invalid chat ID %s: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/telegram/telegram.go:227 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"}