{"record":{"id":"f6009b36a0dc7e45","repo":"tinyhumansai/openhuman","slug":"namespace-is-required-for-clear","errorCode":null,"errorMessage":"--namespace is required for clear","messagePattern":"--namespace is required for clear","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/core/memory_cli.rs","lineNumber":418,"sourceCode":"    while i < args.len() {\n        match args[i].as_str() {\n            \"--namespace\" | \"-n\" => {\n                namespace = Some(next_arg(args, &mut i, \"--namespace\")?);\n            }\n            \"-v\" | \"--verbose\" => {\n                verbose = true;\n                i += 1;\n            }\n            \"-h\" | \"--help\" => {\n                println!(\"Usage: openhuman memory clear --namespace <ns> [-v]\");\n                return Ok(());\n            }\n            other => return Err(anyhow::anyhow!(\"unknown clear arg: {other}\")),\n        }\n    }\n\n    let namespace =\n        namespace.ok_or_else(|| anyhow::anyhow!(\"--namespace is required for clear\"))?;\n\n    crate::core::logging::init_for_cli_run(verbose, crate::core::logging::CliLogDefault::Global);\n\n    let rt = tokio::runtime::Builder::new_multi_thread()\n        .enable_all()\n        .build()?;\n\n    rt.block_on(async {\n        let client = create_memory_client(\"clear\").await?;\n        client\n            .clear_namespace(&namespace)\n            .await\n            .map_err(anyhow::Error::msg)?;\n        eprintln!(\"[memory:cli] namespace '{namespace}' cleared\");\n        Ok::<_, anyhow::Error>(())\n    })?;\n\n    Ok(())","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/memory_cli.rs#L400-L436","documentation":"Error \"--namespace is required for clear\" thrown in tinyhumansai/openhuman.","triggerScenarios":"Thrown at src/core/memory_cli.rs:418 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}