{"record":{"id":"a6e163d867dc3ae8","repo":"zeroclaw-labs/zeroclaw","slug":"cli-alias-delete-reserved-default","errorCode":"cli-alias-delete-reserved-default","errorMessage":"the `default` agent is reserved and cannot be deleted","messagePattern":"the `default` agent is reserved and cannot be deleted","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/alias_cli/mod.rs","lineNumber":382,"sourceCode":"        }\n        AgentsCommands::Rename { from, to } => {\n            // Capture the workspace path while the `from` entry still exists\n            // (custom paths are read off the entry, which the rename moves).\n            let old_ws = config.agent_workspace_dir(&from);\n            rename_config(config, &AliasKind::Agent, &from, &to)?;\n            // Persist the config rename before the irreversible owned-state side\n            // effects (workspace move + DB re-point), so a later failure can't\n            // leave the config and owned state split.\n            save(config).await?;\n            agent_rename_owned_state(config, &from, &to, &old_ws).await\n        }\n        AgentsCommands::Delete {\n            alias,\n            dry_run,\n            yes,\n        } => {\n            if alias_refs::is_reserved_agent_alias(&alias) {\n                bail!(\n                    \"{}\",\n                    mt(\n                        \"cli-alias-delete-reserved-default\",\n                        \"the `default` agent is reserved and cannot be deleted\"\n                    )\n                );\n            }\n            if dry_run {\n                print_impact(&AliasKind::Agent, &alias, config);\n                return Ok(());\n            }\n            if !yes {\n                print_impact(&AliasKind::Agent, &alias, config);\n                println!(\n                    \"\\n{}\",\n                    mt(\n                        \"cli-alias-no-changes\",\n                        \"No changes made. Re-run with --yes to apply (or --dry-run to preview).\"","sourceCodeStart":364,"sourceCodeEnd":400,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/src/alias_cli/mod.rs#L364-L400","documentation":"Error \"the `default` agent is reserved and cannot be deleted\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at src/alias_cli/mod.rs:382 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The `default` agent cannot be deleted; delete a different agent or reset the default agent's configuration instead.","Remove the custom agents and keep `default`, or edit config.toml to clear unwanted default settings."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}