BigPizzaV3/CodexPlusPlus · error
Codex App directory not found
Error message
Codex App directory not found
What it means
resolve_app_dir resolves the Codex App directory from the provided path or the saved backend setting; when neither yields a valid directory, it returns this error. It is a precondition failure: the launcher cannot proceed without knowing where the Codex app lives.
Solutions
- Set the Codex App path in the backend settings to the app bundle/directory (e.g. /Applications/Codex.app)
- Reinstall the Codex app if it was removed
- Clear the stale saved path so auto-detection can find the app again
Example fix
// before (settings) codexAppPath: "" // after codexAppPath: "/Applications/Codex.app"
Defensive patterns
Strategy: validation
Validate before calling
fn app_dir_configured(settings: &BackendSettings) -> bool {
!settings.codex_app_path.is_empty()
&& std::path::Path::new(&settings.codex_app_path).is_dir()
} Try / catch
match resolve_app_dir(&app, None, &settings) {
Err(e) if e.to_string() == "Codex App directory not found" => {
// open settings UI asking the user to locate Codex.app
}
other => other?,
} Prevention
- Prompt users to set the Codex app path on first run and validate it is a directory
- Re-validate the saved path at startup and clear it if the app was moved/uninstalled
- Use platform default locations (/Applications, ~/Applications) as fallbacks
When it happens
Trigger: Calling launch with app_dir=None and settings.codex_app_path empty or pointing at a non-existent directory, so resolve_codex_app_dir_with_saved returns None.
Common situations: Fresh install where the user never picked the Codex app location; user moved/deleted the Codex app; stale saved path after an app update that changed the bundle location.
Related errors
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19).
Data as JSON: /api/errors/ebb533b962d96cb1.
Report an issue: GitHub.
Appendix: source
Thrown at crates/codex-plus-core/src/launcher.rs:689
std::env::var("CODEX_PLUS_HELPER_BIND")
.ok()
.map(|value| value.trim().to_string())
.filter(|value| !value.is_empty())
.unwrap_or_else(|| "127.0.0.1".to_string())
}
#[async_trait(?Send)]
impl LaunchHooks for DefaultLaunchHooks {
fn resolve_app_dir(
&self,
app_dir: Option<&Path>,
settings: &BackendSettings,
) -> anyhow::Result<PathBuf> {
crate::app_paths::resolve_codex_app_dir_with_saved(
app_dir,
Some(settings.codex_app_path.as_str()),
)
.ok_or_else(|| anyhow::anyhow!("Codex App directory not found"))
}
fn select_debug_port(&self, requested: u16) -> u16 {
crate::ports::select_packaged_codex_debug_port(requested)
}
fn select_helper_port(&self, requested: u16) -> u16 {
crate::ports::select_platform_loopback_port(requested)
}
async fn load_settings(&self) -> anyhow::Result<BackendSettings> {
SettingsStore::default().load()
}
fn cleanup_unsupported_config(&self) -> anyhow::Result<()> {
let home = crate::relay_config::default_codex_home_dir();
crate::relay_config::cleanup_unsupported_approval_policies_in_home(&home)?;
Ok(())View on GitHub (pinned to b1ed92e5e4)