chenhg5/cc-connect · error
platform %q does not support ReconstructReplyCtx
Error message
platform %q does not support ReconstructReplyCtx
What it means
dispatchRestartNotify requires the target platform to implement ReplyContextReconstructor so the original reply context (thread/topic targeting) can be rebuilt; platforms lacking this capability are rejected with 'platform %q does not support ReconstructReplyCtx'. Delivery cannot preserve reply threading without it.
Source
Thrown at core/engine.go:287
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 {
time.Sleep(wait)
}
if err := e.waitOutgoing(p); err != nil {
lastErr = fmt.Errorf("wait outgoing: %w", err)View on GitHub (pinned to 4000b2338a)
Solutions
- Upgrade the platform adapter (or cc-connect build) to one implementing ReplyContextReconstructor
- Fall back to a plain Send without reconstructed reply context for platforms lacking the capability
- Drop/requeue the pending RestartRequest targeting an incapable platform with a user-facing notice
Example fix
// before
// platform without the capability
func (p *Platform) Reply(ctx, ref, text) error { ... } // no ReconstructReplyCtx
// after
func (p *Platform) ReconstructReplyCtx(sessionKey string) (core.ReplyCtx, error) {
return p.store.ReplyCtxFor(sessionKey)
} Defensive patterns
Strategy: fallback
Validate before calling
rc, ok := p.(core.ReplyContextReconstructor)
if !ok { /* use plain Send fallback */ } Type guard
rc, ok := p.(core.ReplyContextReconstructor)
Try / catch
if err := e.dispatchRestartNotify(req); err != nil {
if strings.Contains(err.Error(), "does not support ReconstructReplyCtx") {
return e.fallbackPlainNotify(req) // send without reply context
}
return err
} Prevention
- Prefer platform adapters implementing ReplyContextReconstructor for restart flows
- Capability-check the platform before enqueueing a restart notify
- Keep adapters current with core interface additions
When it happens
Trigger: A pending RestartRequest targets a platform adapter that never implemented ReplyContextReconstruct / ReconstructReplyCtx — e.g. an older or minimal platform plugin compiled into the daemon.
Common situations: Restart requests issued on a platform (or custom plugin build) that lacks reply-context reconstruction support; version skew where the queued request predates adding the capability to that adapter.
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
- platform %s: %w
- bridge: adapter %q does not support reconstruct_reply
- platform %q not ready
- platform %q does not support proactive messaging (timer)
- platform %q does not support proactive messaging
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/cc1bdc8f2a0f88e4.
Report an issue: GitHub.