{"record":{"id":"05d8af9788f46854","repo":"nikivdev/code","slug":"project-not-found-use-f-projects-to-see-re","errorCode":null,"errorMessage":"Project '{}' not found. Use `f projects` to see registered projects.","messagePattern":"Project '(.+?)' not found\\. Use `f projects` to see registered projects\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/processes.rs","lineNumber":299,"sourceCode":"    if let Some(ref task_id) = opts.task_id {\n        return show_hub_task_logs(task_id, opts.follow);\n    }\n\n    if opts.list {\n        return list_available_logs(opts.all);\n    }\n\n    if opts.all {\n        return show_all_logs(opts.lines);\n    }\n\n    // Resolve project: --project flag > flow.toml in cwd > active project\n    let (project_root, config_path, project_name) = if let Some(ref name) = opts.project {\n        // Explicit project name\n        match projects::resolve_project(name)? {\n            Some(entry) => (entry.project_root, entry.config_path, Some(entry.name)),\n            None => {\n                bail!(\n                    \"Project '{}' not found. Use `f projects` to see registered projects.\",\n                    name\n                );\n            }\n        }\n    } else if opts.config.exists() {\n        // flow.toml in current directory\n        let (cfg_path, cfg) = tasks::load_project_config(opts.config.clone())?;\n        let canonical = cfg_path.canonicalize().unwrap_or_else(|_| cfg_path.clone());\n        let root = cfg_path\n            .parent()\n            .unwrap_or(Path::new(\".\"))\n            .canonicalize()\n            .unwrap_or_else(|_| cfg_path.parent().unwrap_or(Path::new(\".\")).to_path_buf());\n        (root, canonical, cfg.project_name)\n    } else if let Some(active) = projects::get_active_project() {\n        // Fall back to active project\n        match projects::resolve_project(&active)? {","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/processes.rs#L281-L317","documentation":"show_task_logs resolves the target project from the --project flag; resolve_project returns None when the name is not in the registered-projects store, so the command bails with this message pointing at `f projects` for discovery. It prevents showing logs for a project the tool has never registered.","triggerScenarios":"`f logs -p <name>` (or opts.project set) where the name matches no registered project entry — misspelling, project removed from the registry, or never registered because tasks were only run elsewhere.","commonSituations":"Typo in the project name, referencing a project after its registration was cleaned up, running on another machine/checkout where the project was never registered, or renaming the project directory without re-registering.","solutions":["Run `f projects` to list registered names and use one of those exactly.","Register the project (run a task inside it or the projects register command) before fetching logs.","Drop the -p flag and run from inside the project directory so resolution falls back to flow.toml in cwd."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// resolve the project name before calling logs\nlet names = list_projects()?;\nif !names.iter().any(|p| p == requested) {\n    eprintln!(\"unknown project '{requested}'; registered: {names:?}\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match show_task_logs(opts) {\n    Ok(()) => (),\n    Err(e) if e.to_string().contains(\"not found. Use `f projects`\") => {\n        eprintln!(\"{e}\"); // then list: f projects\n        std::process::exit(1);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Run `f projects` to confirm the exact registered name before -p.","Register a project immediately after cloning/renaming it.","Avoid hardcoding project names in scripts; resolve them dynamically."],"tags":["cli","project-resolution","not-found"],"backgroundTag":"project-not-found","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}