chenhg5/cc-connect · error
platform %q does not support proactive messaging (cron)
Error message
platform %q does not support proactive messaging (cron)
What it means
After locating the target platform for a cron job, ExecuteCronJob requires it to implement the optional ReplyContextReconstructor interface so it can build a reply context for proactive messaging. If the platform adapter does not implement it, the engine returns 'platform %q does not support proactive messaging (cron)'. This is a capability gap in the platform adapter, not a runtime failure — some simpler platform adapters simply cannot initiate messages to a reconstructed context.
Source
Thrown at core/engine.go:1503
// Search for a known platform name within the key and strip the prefix.
if targetPlatform == nil {
for _, p := range e.platforms {
needle := ":" + p.Name() + ":"
if idx := strings.Index(sessionKey, needle); idx >= 0 {
targetPlatform = p
platformName = p.Name()
sessionKey = sessionKey[idx+1:] // strip workspace prefix
break
}
}
}
if targetPlatform == nil {
return fmt.Errorf("platform %q not found for session %q", platformName, sessionKey)
}
rc, ok := targetPlatform.(ReplyContextReconstructor)
if !ok {
return fmt.Errorf("platform %q does not support proactive messaging (cron)", platformName)
}
runSessionKey := sessionKey
var replyCtx any
var err error
if !job.Mute {
if resolver, ok := targetPlatform.(CronReplyTargetResolver); ok {
resolvedSessionKey, resolvedReplyCtx, err := resolver.ResolveCronReplyTarget(sessionKey, cronRunTitle(job))
if err != nil {
if !errors.Is(err, ErrNotSupported) {
return fmt.Errorf("resolve cron reply target: %w", err)
}
} else {
if resolvedSessionKey != "" {
runSessionKey = resolvedSessionKey
}
if resolvedReplyCtx != nil {
replyCtx = resolvedReplyCtxView on GitHub (pinned to 4000b2338a)
Solutions
- Move the cron job to a platform adapter that implements ReplyContextReconstructor (e.g. feishu, telegram, slack).
- If you own the adapter, implement ReplyContextReconstructor.ReconstructReplyCtx(sessionKey) so proactive cron messaging works.
- Disable cron jobs for that platform (remove the scheduled jobs referencing it) to avoid the error at every trigger.
- Check whether a fuller implementation of the platform exists in this repo before writing a custom one.
Example fix
// before: adapter without proactive support
func (p *Platform) Name() string { return "miniplat" }
// after: add the required capability
func (p *Platform) ReconstructReplyCtx(sessionKey string) (any, error) {
chatID, ok := parseChatID(sessionKey)
if !ok {
return nil, fmt.Errorf("miniplat: invalid session key %q", sessionKey)
}
return &ReplyCtx{ChatID: chatID}, nil
} Defensive patterns
Strategy: type-guard
Validate before calling
// Go: check capability before scheduling a cron job on a platform
if _, ok := platform.(core.ReplyContextReconstructor); !ok {
return fmt.Errorf("platform %s cannot host cron jobs (no proactive messaging)", platform.Name())
} Type guard
rc, ok := targetPlatform.(core.ReplyContextReconstructor); if !ok { /* platform cannot do proactive cron messaging */ } Try / catch
if err := engine.ExecuteCronJob(job); err != nil {
if strings.Contains(err.Error(), "does not support proactive messaging") {
slog.Warn("disabling cron on non-proactive platform", "job", job.ID, "err", err)
scheduler.Disable(job.ID)
}
} Prevention
- Only schedule cron jobs on platforms known to implement ReplyContextReconstructor.
- When writing a custom platform adapter, implement ReplyContextReconstructor if cron support is desired.
- Run a capability check at cron-registration time, not just at trigger time.
- Prefer bundled full-featured adapters over minimal custom ones for scheduled messaging.
When it happens
Trigger: A cron job's SessionKey resolves to a platform registered in e.platforms that compiles and runs but does not implement ReplyContextReconstructor (the type assertion targetPlatform.(ReplyContextReconstructor) fails), and a cron job is scheduled against it.
Common situations: Scheduling a cron job on a minimal/custom platform adapter that only supports replying within an active conversation; using a platform integration that never implemented proactive message support; running a stripped build where the full-capability adapter was replaced.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- cron job not found
- cron project not found
- %s must be true or false
- timeout_mins must be an integer
- session_key is required
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/db9f49dba44e504f.
Report an issue: GitHub.