BigPizzaV3/CodexPlusPlus · error

fast startup config should serialize

Error message

fast startup config should serialize

What it means

injection_script_with_settings serializes the fast-startup feature flag (fast_startup_config) into the injected script globals; this expect-style error fires if serde_json fails. Serializing a boolean flag is infallible, so the error marks an internal invariant breach.

Source

Thrown at crates/codex-plus-core/src/assets.rs:429

    };
    format!(
        "window.__CODEX_SESSION_DELETE_HELPER__ = {};\nwindow.__CODEX_PLUS_VERSION__ = {};\nwindow.__CODEX_PLUS_BUILD__ = {};\nwindow.__CODEX_PLUS_IMAGE_OVERLAY__ = {};\nwindow.__CODEX_PLUS_PLUGIN_MARKETPLACES__ = {};\nwindow.__CODEX_PLUS_EXTERNAL_DREAM_SKIN_RUNTIME__ = true;\nwindow.__CODEX_PLUS_DREAM_SKIN_PLATFORM__ = {};\nwindow.__CODEX_PLUS_DREAM_SKIN_REVISION__ = {};\nwindow.__CODEX_PLUS_DREAM_SKIN_ART__ = {};\nwindow.__CODEX_PLUS_DREAM_SKIN_ART_SIGNATURE__ = {};\nwindow.__CODEX_PLUS_DREAM_SKIN_THEME__ = {};\nwindow.__CODEX_PLUS_PASTE_FIX__ = {};\nwindow.__CODEX_PLUS_FORCE_CHINESE_LOCALE__ = {};\nwindow.__CODEX_PLUS_FAST_STARTUP__ = {};\nwindow.__CODEX_PLUS_HIDE_OFFICIAL_USAGE_ALERT__ = {};\n{}\n{}\n{}",
        serde_json::to_string(&helper_url).expect("helper URL should serialize"),
        serde_json::to_string(crate::version::VERSION).expect("version should serialize"),
        serde_json::to_string(DIAGNOSTIC_BUILD_ID).expect("build id should serialize"),
        serde_json::to_string(&image_overlay).expect("image overlay config should serialize"),
        serde_json::to_string(&plugin_marketplaces).expect("plugin marketplaces should serialize"),
        serde_json::to_string(dream_skin_platform()).expect("dream skin platform should serialize"),
        serde_json::to_string(DREAM_SKIN_RENDERER_REVISION)
            .expect("dream skin renderer revision should serialize"),
        serde_json::to_string(&dream_skin_art).expect("dream skin art should serialize"),
        serde_json::to_string(&dream_skin_art_signature)
            .expect("dream skin art signature should serialize"),
        serde_json::to_string(dream_skin_theme).expect("dream skin theme should serialize"),
        serde_json::to_string(&paste_fix).expect("paste fix config should serialize"),
        serde_json::to_string(&force_chinese_locale)
            .expect("force Chinese locale config should serialize"),
        serde_json::to_string(&fast_startup).expect("fast startup config should serialize"),
        serde_json::to_string(&hide_official_usage_alert)
            .expect("usage alert config should serialize"),
        renderer_script(),
        stepwise_runtime,
        dream_skin_target_runtime,
    )
}

pub fn dream_skin_live_update_probe_script() -> String {
    format!(
        "(() => {{ const state = window.__CODEX_DREAM_SKIN_STATE__ || window.__CODEX_GLASS_VISION_SKIN_STATE__; if (window.__CODEX_PLUS_DREAM_SKIN_RUNTIME_REVISION__ !== {} || !state) return null; state.ensure?.(); return JSON.stringify({{ artSignature: String(window.__CODEX_PLUS_DREAM_SKIN_ART_SIGNATURE__ || ''), payloadSignature: String(window.__CODEX_PLUS_DREAM_SKIN_PAYLOAD_SIGNATURE__ || '') }}); }})()",
        serde_json::to_string(DREAM_SKIN_RENDERER_REVISION)
            .expect("dream skin renderer revision should serialize")
    )
}

pub fn dream_skin_live_update_script(settings: &BackendSettings, include_art: bool) -> String {
    dream_skin_target_runtime_script(settings, include_art)

View on GitHub (pinned to f2074595a2)

Solutions

  1. Verify fast_startup_config still returns a JSON-safe value
  2. Review recent refactors of the injection script builder
  3. Report as a bug; expected infallible
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/codex-plus-core/src/assets.rs:429 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23). Data as JSON: /api/errors/918421ad49e85ccf. Report an issue: GitHub.