zeroclaw-labs/zeroclaw · error

cli-alias-delete-failed

cli-alias-delete-failed

Error message

delete failed: {$error}

What it means

Catch-all arm of apply_delete: any CascadeError other than Refused/NotFound (persistence or cascade failures) is stringified and propagated as 'delete failed'. Generic error-propagation path; the actual cause must be read from the embedded message.

Solutions

  1. Inspect the reported error, fix the underlying cause (permissions, missing file, invalid state), and retry the delete.
  2. Edit ~/.zeroclaw/config.toml directly to remove the entry if the CLI delete keeps failing.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/alias_cli/mod.rs:279 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/c70735ac96db8901. Report an issue: GitHub.

Appendix: source

Thrown at src/alias_cli/mod.rs:279

            bail!(
                "{}",
                mt(
                    "cli-alias-delete-refused-hint",
                    "delete refused — resolve the hard references first"
                )
            );
        }
        Err(CascadeError::NotFound(p)) => bail!(
            "{}",
            mta(
                "cli-alias-not-configured",
                &[("path", p.as_str())],
                "{$path} is not configured"
            )
        ),
        Err(e) => {
            let es = e.to_string();
            bail!(
                "{}",
                mta(
                    "cli-alias-delete-failed",
                    &[("error", es.as_str())],
                    "delete failed: {$error}"
                )
            )
        }
    }
}

/// Rename an aliased entry's config references (config-layer only).
fn rename_config(config: &mut Config, kind: &AliasKind, from: &str, to: &str) -> Result<()> {
    match alias_refs::rename_with_cascade(config, kind, from, to) {
        Ok(report) => {
            for path in &report.dirty_paths {
                config.mark_dirty(path);
            }

View on GitHub (pinned to 88bb9c8533)