chenhg5/cc-connect · error
slack: send observation: %w
Error message
slack: send observation: %w
What it means
Wrapped error from slack-go PostMessageContext when posting a terminal-session observation message to a channel ID with link unfurls disabled; the Slack Web API rejected the observational post.
Source
Thrown at platform/slack/slack.go:529
ThreadTimestamp: rc.timestamp,
})
if err != nil {
return fmt.Errorf("slack: send image: %w", err)
}
return nil
}
var _ core.ImageSender = (*Platform)(nil)
var _ core.ObserverTarget = (*Platform)(nil)
// SendObservation implements core.ObserverTarget for terminal session observation.
func (p *Platform) SendObservation(ctx context.Context, channelID, text string) error {
_, _, err := p.client.PostMessageContext(ctx, channelID,
slack.MsgOptionText(text, false),
slack.MsgOptionDisableLinkUnfurl(),
)
if err != nil {
return fmt.Errorf("slack: send observation: %w", err)
}
return nil
}
// SendFile uploads and sends a generic file to the channel.
// Implements core.FileSender.
func (p *Platform) SendFile(ctx context.Context, rctx any, file core.FileAttachment) error {
rc, ok := rctx.(replyContext)
if !ok {
return fmt.Errorf("slack: SendFile: invalid reply context type %T", rctx)
}
name := file.FileName
if name == "" {
name = "attachment"
}
_, err := p.client.UploadFileV2Context(ctx, slack.UploadFileV2Parameters{View on GitHub (pinned to 4000b2338a)
Solutions
- Verify the channel ID and bot membership
- Non-fatal: check logs if failures repeat
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at platform/slack/slack.go:529 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/38b6d373dbba661c.
Report an issue: GitHub.