{"record":{"id":"694ab3c31b83a1e9","repo":"tinyhumansai/openhuman","slug":"missing-workspace","errorCode":null,"errorMessage":"missing --workspace","messagePattern":"missing --workspace","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/subconscious_cli.rs","lineNumber":239,"sourceCode":"            \"interval_minutes\": mode.default_interval_minutes().max(5),\n        });\n\n        println!(\"{}\", serde_json::to_string_pretty(&status)?);\n        Ok(())\n    })\n}\n\n// ── helpers ────────────────────────────────────────────────────────────────\n\nfn parse_workspace_flag(args: &[String]) -> Result<Option<PathBuf>> {\n    let mut workspace: Option<PathBuf> = None;\n    let mut i = 0;\n    while i < args.len() {\n        match args[i].as_str() {\n            \"--workspace\" | \"-w\" => {\n                workspace = Some(PathBuf::from(\n                    args.get(i + 1)\n                        .ok_or_else(|| anyhow!(\"missing --workspace\"))?,\n                ));\n                i += 2;\n            }\n            other => return Err(anyhow!(\"unknown flag '{other}'\")),\n        }\n    }\n    Ok(workspace)\n}\n\nfn is_help(s: &str) -> bool {\n    matches!(s, \"--help\" | \"-h\" | \"help\")\n}\n\nfn print_help() {\n    eprintln!(\n        \"Usage: openhuman subconscious <command> [options]\n\nCommands:","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/core/subconscious_cli.rs#L221-L257","documentation":"Value-presence guard in `parse_workspace_flag`, used by the `subconscious status` path. When --workspace/-w is the final token there is no following argument to read, so the parser fails instead of treating the flag as valueless. It reports a truncated command line, not an invalid path.","triggerScenarios":"Thrown at src/core/subconscious_cli.rs:239 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Put the path immediately after the flag: `--workspace /path/to/ws` (short form -w).","Omit the flag to use the configured workspace_dir.","Quote paths that contain spaces."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}