{"record":{"id":"97ba31cc67d430eb","repo":"gitbutlerapp/gitbutler","slug":"target-value-is-required","errorCode":null,"errorMessage":"{} target value is required","messagePattern":"(.+?) target value is required","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but-agentlog/src/cli.rs","lineNumber":358,"sourceCode":"                None => {\n                    let status = find_session_status(&repo_path, &session_key)?\n                        .with_context(|| format!(\"agent session '{session_key}' was not found\"))?;\n                    let timeline = get_session_timeline_outline(\n                        &repo_path,\n                        &session_key,\n                        status,\n                        Some(limit.unwrap_or(DEFAULT_TIMELINE_LIMIT)),\n                    )\n                    .context(\"failed to read agent session timeline\")?;\n                    Ok(CommandOutput::Timeline(timeline))\n                }\n            }\n        }\n        Command::Skim { target, value } => {\n            let explicit_target = match (target, value) {\n                (Some(target), Some(value)) => Some((target, value)),\n                (Some(target), None) => {\n                    anyhow::bail!(\"{} target value is required\", target.as_str())\n                }\n                (None, Some(_)) => {\n                    anyhow::bail!(\"target kind is required when target value is provided\")\n                }\n                (None, None) => None,\n            };\n            let repo_path = if explicit_target.is_some() {\n                resolve_read_repo_path(dir)?\n            } else {\n                resolve_workdir(dir)?\n            };\n            let (target, value) = match explicit_target {\n                Some(target) => target,\n                None => skim::resolve_default_branch_target(&repo_path)?,\n            };\n            let target_key = related_session_target_key(target, &value);\n            let sessions = find_related_sessions_limited_by_statuses(\n                &repo_path,","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-agentlog/src/cli.rs#L340-L376","documentation":"In crates/but-agentlog/src/cli.rs run_from_dir, the `but agentlog skim <target>` command requires both a target kind and a value. Supplying a target kind (e.g. branch/session) without a value bails with \"<target> target value is required\".","triggerScenarios":"Running `but agentlog skim branch` (target kind given, value omitted) — the (Some(target), None) arm of the match in the Skim command handling bails.","commonSituations":"Typing the skim command with the filter kind but forgetting the identifier, e.g. `but agentlog skim session` instead of `but agentlog skim session <id>`.","solutions":["Provide the value: `but agentlog skim <target> <value>`, e.g. `but agentlog skim branch my-branch`.","Run plain `but agentlog skim` with no arguments to skim without an explicit target filter.","In scripts, check $# / argv length before invoking to ensure both arguments are present."],"exampleFix":"// before\nbut agentlog skim branch\n// after\nbut agentlog skim branch feature/foo","handlingStrategy":"validation","validationCode":"# ensure both args present\n[ $# -eq 2 ] || { echo \"usage: but agentlog skim <target> <value>\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass the target kind together with its value.","Use the plain `but agentlog skim` form (no args) for unfiltered output.","Add arg-count checks in wrapper scripts."],"tags":["rust","cli","argument-validation","agentlog"],"backgroundTag":"missing-cli-argument","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}