nikivdev/code · error
multiple PR selectors provided. Use exactly one selector.
Error message
multiple PR selectors provided. Use exactly one selector.
What it means
`f pr feedback` accepts exactly one PR selector. During token parsing, if a second non-flag token appears after a selector has already been set, the parser bails with this error. Ambiguity between multiple selectors would be unresolvable, so it fails fast.
Source
Thrown at src/commit.rs:9877
match token.as_str() {
"--todo" | "todo" => record_todos = true,
"--full" | "full" => show_full = true,
"--compact" | "compact" => show_full = false,
"--cursor" | "cursor" => open_cursor = true,
"--help" | "-h" => {
return Ok(Some(PrFeedbackCommand {
selector: Some("--help".to_string()),
record_todos: false,
show_full: true,
open_cursor: false,
}));
}
_ if token.starts_with("--") => {
bail!("unknown `f pr feedback` option: {token}");
}
_ => {
if selector.is_some() {
bail!("multiple PR selectors provided. Use exactly one selector.");
}
selector = Some(token.clone());
}
}
}
Ok(Some(PrFeedbackCommand {
selector,
record_todos,
show_full,
open_cursor,
}))
}
fn parse_github_pr_url(input: &str) -> Option<(String, u64)> {
let trimmed = input.trim().trim_end_matches('/');
let prefix = "https://github.com/";
let rest = trimmed.strip_prefix(prefix)?;View on GitHub (pinned to a747e741ae)
Solutions
- Provide exactly one selector and re-run.
- Quote arguments containing spaces: `f pr feedback "PR #42"`.
- Remove the duplicated/default selector from the calling script.
Example fix
// before f pr feedback 123 456 // after f pr feedback 123
Defensive patterns
Strategy: validation
Validate before calling
const selectors = args.filter(t => !t.startsWith("--"));
if (selectors.length > 1) throw new Error("exactly one PR selector required"); Try / catch
try { await feedback(args); }
catch (e) {
if (String(e).includes("multiple PR selectors")) console.error("Pass exactly one selector");
else throw e;
} Prevention
- Pass exactly one PR number/branch/URL per invocation.
- Quote arguments containing spaces to avoid shell word-splitting.
- In scripts, don't append a default selector when the user already supplied one.
When it happens
Trigger: Invoking `f pr feedback` with two or more PR identifiers/URLs/branch names, e.g. `f pr feedback 123 456`; an unquoted string containing spaces being split by the shell into multiple tokens (e.g. `f pr feedback PR #42`).
Common situations: Pasting a PR title or URL with spaces without quoting; scripting that appends a default selector to a user-supplied one; passing both a number and a branch name.
Related errors
- sessions requires a specific provider (claude or codex)
- continue requires a specific provider (claude or codex)
- --all cannot be combined with HASH. Use `f commit-queue appr
- --path cannot be used with --no-commit or --hash
- unknown `f pr feedback` option: {token}
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/8322c1312e27881e.
Report an issue: GitHub.