BigPizzaV3/CodexPlusPlus · error

invalid runtime file path

Error message

invalid runtime file path

What it means

Path guard in the Windows atomic runtime-file writer: the runtime file path handed to the guarded write has no valid parent directory (or is otherwise invalid), so an atomic replace into its parent cannot be performed. Generic sentinel fired before any filesystem mutation.

Solutions

  1. Ensure the runtime file path is absolute with a parent directory
  2. Create the target directory before the guarded write
  3. Fix corrupted settings that may supply an empty path
Defensive patterns

Strategy: validation

When it happens

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

Common situations: See trigger scenarios.


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@fb3ebd9a82 (2026-08-17). Data as JSON: /api/errors/4e7a3115b3aa16d3. Report an issue: GitHub.

Appendix: source

Thrown at crates/codex-plus-core/src/computer_use_guard.rs:440

        return Ok(None);
    };
    if exports.contains_key(SKY_INTERNAL_COMPUTER_USE_CLIENT_EXPORT) {
        return Ok(None);
    }
    exports.insert(
        SKY_INTERNAL_COMPUTER_USE_CLIENT_EXPORT.to_string(),
        serde_json::Value::String(SKY_INTERNAL_COMPUTER_USE_CLIENT_EXPORT.to_string()),
    );
    let mut updated = serde_json::to_string_pretty(&package)?;
    updated.push('\n');
    Ok(Some(updated))
}

#[cfg(windows)]
fn atomic_write_runtime_file(path: &Path, bytes: &[u8]) -> anyhow::Result<()> {
    let parent = path
        .parent()
        .ok_or_else(|| anyhow::anyhow!("invalid runtime file path"))?;
    let temp = parent.join(format!(
        ".{}.codexpp-tmp",
        path.file_name()
            .and_then(|value| value.to_str())
            .unwrap_or("package.json")
    ));
    std::fs::write(&temp, bytes).with_context(|| format!("failed to write {}", temp.display()))?;
    match std::fs::rename(&temp, path) {
        Ok(()) => Ok(()),
        Err(error) => {
            let _ = std::fs::remove_file(&temp);
            Err(error).with_context(|| format!("failed to replace {}", path.display()))
        }
    }
}

#[cfg(windows)]
pub(crate) fn ensure_openai_bundled_marketplace(home: &Path) -> anyhow::Result<Option<PathBuf>> {

View on GitHub (pinned to fb3ebd9a82)