nikivdev/code · error

{app} exited with status {status}

Error message

{app} exited with status {status}

What it means

open_in_zed tries to open a path with macOS `open -a Zed.app` (falling back to Zed Preview.app). If an `open` invocation succeeds in launching but the app exits non-zero, the tool bails with the app name and exit status. It indicates Zed launched but terminated abnormally.

Source

Thrown at src/repos.rs:107

        .status()
        .context("failed to run git clone")?;

    if !status.success() {
        bail!("git clone failed");
    }

    Ok(())
}

fn open_in_zed(path: &std::path::Path) -> Result<()> {
    let try_open = |app: &str| -> Result<()> {
        let status = std::process::Command::new("open")
            .args(["-a", app])
            .arg(path)
            .status()
            .with_context(|| format!("failed to open {app}"))?;
        if !status.success() {
            bail!("{app} exited with status {status}");
        }
        Ok(())
    };

    try_open("/Applications/Zed.app").or_else(|_| try_open("/Applications/Zed Preview.app"))
}

/// Fuzzy search through repos in ~/repos and print the selected path.
fn fuzzy_select_repo() -> Result<()> {
    let root = config::expand_path(DEFAULT_REPOS_ROOT);
    if !root.exists() {
        println!("No repos directory found at {}", root.display());
        println!("Clone a repo with: f repos clone <url>");
        return Ok(());
    }

    let repos = discover_repos(&root)?;
    if repos.is_empty() {

View on GitHub (pinned to a747e741ae)

Solutions

  1. Launch Zed manually on the path to see the actual failure
  2. Reinstall or update Zed (check /Applications/Zed.app integrity)
  3. Open the path with an alternate editor if Zed keeps crashing
  4. Retry with Zed Preview vs stable — one of the two fallbacks may work
Defensive patterns

Strategy: fallback

Validate before calling

const fs = require("fs");
const zedPaths = ["/Applications/Zed.app", "/Applications/Zed Preview.app"];
if (!zedPaths.some((p) => fs.existsSync(p))) console.warn("Zed not installed; pick another editor");

Try / catch

try {
  run(["f", "repo-open", path]);
} catch (e) {
  if (String(e).includes("exited with status")) {
    execSync(`code ${path}`); // fallback to another editor
  } else throw e;
}

Prevention

When it happens

Trigger: `open -a /Applications/Zed.app <path>` returns a non-zero exit status during `f` repo-open operations (run / fuzzy_select_repo flows).

Common situations: Zed crashing on startup; corrupted Zed install or pending broken update; macOS `open` reporting failure for an unresponsive app; unsupported/binary file causing Zed to abort.

Related errors


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/bbdf94d8885400f7. Report an issue: GitHub.