BigPizzaV3/CodexPlusPlus · error
invalid @oai/sky package.json path
Error message
invalid @oai/sky package.json path
What it means
Validation guard in the @oai/sky runtime-compat patcher: the caller passed a package.json path that failed path validation before Codex++ would read and rewrite the file to add the computer-use export. Fires when the runtime-compat routine is invoked with a package.json location that cannot be safely operated on.
Solutions
- Verify the path points at an existing @oai/sky package.json
- Pass the resolved absolute path instead of a relative or user-typed path
- Reinstall or relocate the @oai/sky package if it moved
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/computer_use_guard.rs:186 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/d4e7f07b43bd8dac.
Report an issue: GitHub.
Appendix: source
Thrown at crates/codex-plus-core/src/computer_use_guard.rs:186
changed: false,
package_json: Some(package_json.to_path_buf()),
backup_path: None,
});
}
let existing = std::fs::read_to_string(package_json)
.with_context(|| format!("failed to read {}", package_json.display()))?;
let Some(updated) = add_sky_internal_computer_use_export(&existing)? else {
return Ok(RuntimeCompatResult {
changed: false,
package_json: Some(package_json.to_path_buf()),
backup_path: None,
});
};
let backup_path = package_json
.parent()
.ok_or_else(|| anyhow::anyhow!("invalid @oai/sky package.json path"))?
.join(SKY_PACKAGE_EXPORTS_BACKUP);
if !backup_path.exists() {
std::fs::copy(package_json, &backup_path).with_context(|| {
format!(
"failed to back up {} to {}",
package_json.display(),
backup_path.display()
)
})?;
}
atomic_write_runtime_file(package_json, updated.as_bytes())?;
Ok(RuntimeCompatResult {
changed: true,
package_json: Some(package_json.to_path_buf()),
backup_path: Some(backup_path),
})
}
View on GitHub (pinned to fb3ebd9a82)