chenhg5/cc-connect · error
platform %q not ready
Error message
platform %q not ready
What it means
dispatchRestartNotify resolves the restart notification's target platform via lookupReadyPlatform; if no ready platform with that name exists it returns 'platform %q not ready'. The restart-notify path requires the platform to be connected and initialized before it can deliver the message.
Source
Thrown at core/engine.go:283
}
// clearPendingRestart removes the queued notify if it is still the same
// request (avoids clearing a newer notify that replaced this one).
func (e *Engine) clearPendingRestart(req *RestartRequest) {
e.pendingRestartMu.Lock()
if e.pendingRestartNotify == req {
e.pendingRestartNotify = nil
}
e.pendingRestartMu.Unlock()
}
// dispatchRestartNotify sends the notify to the target platform with up
// to 3 attempts (initial + 2 retries) on transient failure. The
// platform must already be ready when this is called.
func (e *Engine) dispatchRestartNotify(req *RestartRequest) error {
p := e.lookupReadyPlatform(req.Platform)
if p == nil {
return fmt.Errorf("platform %q not ready", req.Platform)
}
rc, ok := p.(ReplyContextReconstructor)
if !ok {
return fmt.Errorf("platform %q does not support ReconstructReplyCtx", req.Platform)
}
rctx, err := rc.ReconstructReplyCtx(req.SessionKey)
if err != nil {
return fmt.Errorf("reconstruct reply ctx: %w", err)
}
text := e.i18n.T(MsgRestartSuccess)
if CurrentVersion != "" {
text += fmt.Sprintf(" (%s)", CurrentVersion)
}
backoffs := []time.Duration{0, 500 * time.Millisecond, 1500 * time.Millisecond}
var lastErr error
for attempt, wait := range backoffs {
if wait > 0 {View on GitHub (pinned to 4000b2338a)
Solutions
- Verify the platform is enabled and started in config.toml and that its credentials are valid
- Check platform connection logs for startup failures and restart the daemon after fixing
- Retry the restart flow once the platform reports ready; stale pending requests for removed platforms should be dropped
Example fix
// before // telegram token invalid -> platform never ready -> notify fails // after // fix bot token in config.toml, ensure [platforms.telegram] enabled = true, restart daemon
Defensive patterns
Strategy: retry
Validate before calling
if e.lookupReadyPlatform(req.Platform) == nil { return fmt.Errorf("platform %s not ready", req.Platform) } Try / catch
if err := e.dispatchRestartNotify(req); err != nil {
if strings.Contains(err.Error(), "not ready") {
requeueWithBackoff(req) // retry when platform reconnects
}
} Prevention
- Only enqueue restart notifications for platforms that are currently ready
- Re-validate queued requests against active platforms before dispatch
- Fix platform credentials/config so platforms reach ready state reliably
When it happens
Trigger: runPendingRestartNotify processing a queued RestartRequest whose target platform is disabled in config, failed to start, is still connecting, or was renamed since the request was queued.
Common situations: User issues a restart command and the reply platform later fails to reconnect (invalid token, network outage) before the pending notify is dispatched; config change removes the platform between queueing and dispatch.
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
- project %q preflight: %w
- project %q probe: %w
- project %q audit: %s
- run_as_user startup checks failed for %d project(s); see log
- platform %q does not support ReconstructReplyCtx
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/ae4c1c5c703b1393.
Report an issue: GitHub.