BigPizzaV3/CodexPlusPlus · error · anyhow::Error
Dream Skin theme config exceeds 256 KiB
Error message
Dream Skin theme config exceeds 256 KiB
What it means
Size guard in save_dream_skin_theme: the serialized theme.json for a Dream Skin theme exceeds 256 KiB, so it would bloat theme storage and is rejected before writing. The offending input is an oversized draft config (usually from an imported package).
Source
Thrown at crates/codex-plus-core/src/dream_skin_library.rs:283
"failed to create theme staging directory {}",
staging.display()
)
})?;
let staged = (|| -> anyhow::Result<()> {
if draft.image_path.trim().is_empty() {
let (_, bytes) = crate::assets::dream_skin_default_image();
crate::settings::atomic_write(&staging.join("image.png"), bytes)?;
} else {
crate::dream_skin::prepare_dream_skin_image_for_directory(
Path::new(draft.image_path.trim()),
&staging,
"image",
)?;
}
let config = serde_json::to_vec_pretty(&draft.config)?;
if config.len() as u64 > THEME_CONFIG_LIMIT {
bail!("Dream Skin theme config exceeds 256 KiB");
}
crate::settings::atomic_write(&staging.join(THEME_CONFIG_FILE), &config)?;
Ok(())
})();
if let Err(error) = staged {
let _ = remove_known_theme_directory(&staging);
return Err(error);
}
let target = themes_dir.join(&draft.config.id);
replace_theme_directory(&staging, &target, &suffix)?;
let stored = load_stored_dream_skin_theme(state_dir, &draft.config.id)?;
Ok(summary_from_draft(&stored, false, false))
}
pub fn save_validated_dream_skin_package(
state_dir: &Path,
package: &crate::dream_skin_package::ValidatedDreamSkinPackage,View on GitHub (pinned to f2074595a2)
Solutions
- Reduce the theme config size (trim CSS/custom data) before saving
- Do not import packages with bloated theme.json payloads
- Split content into multiple themes if legitimately large
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_library.rs:283 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/c0defb3f96de1057.
Report an issue: GitHub.