nikivdev/code · error
empty resolver command for {}
Error message
empty resolver command for {} What it means
External session resolvers are configured as command-line strings. The tool splits the command with `shell_words::split`; if the split yields no tokens (empty or whitespace-only command), it cannot spawn a process and bails naming the resolver.
Source
Thrown at src/ai.rs:12576
for candidate in candidates {
if !resolver
.matches
.iter()
.any(|pattern| wildcard_match(pattern, candidate))
{
continue;
}
let command_text = render_reference_resolver_command(
&resolver.command,
candidate,
query_text,
target_path,
);
let args = shell_words::split(&command_text)
.with_context(|| format!("invalid resolver command: {}", command_text))?;
let Some((program, rest)) = args.split_first() else {
bail!("empty resolver command for {}", resolver.name);
};
let output = Command::new(program)
.args(rest)
.current_dir(target_path)
.output()
.with_context(|| format!("failed to run resolver {}", resolver.name))?;
if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr).trim().to_string();
bail!(
"resolver {} failed for {}: {}",
resolver.name,
candidate,
if stderr.is_empty() {
format!("exit status {}", output.status)
} else {
stderr
}
);View on GitHub (pinned to a747e741ae)
Solutions
- Set a real command for the resolver in config (e.g. `fzf ...` or a script path)
- Remove the empty resolver entry entirely if unneeded
- Check whether env expansion emptied the command and fix the variable
Example fix
// before (config) [[resolver]] name = "pick" command = "" // after [[resolver]] name = "pick" command = "f codex sessions --json | fzf"
Defensive patterns
Strategy: validation
Validate before calling
if resolver.command.trim().is_empty() {
eprintln!("resolver '{}' has an empty command", resolver.name);
return;
}
let args = shell_words::split(&resolver.command)?;
if args.is_empty() { eprintln!("resolver command splits to nothing"); return; } Type guard
fn resolver_command_ok(cmd: &str) -> bool {
shell_words::split(cmd).map(|a| !a.is_empty()).unwrap_or(false)
} Prevention
- Validate resolver config at startup and fail with a clear message
- Never ship resolver entries with placeholder/empty commands
- Test resolver config changes in a dry-run mode
When it happens
Trigger: A resolver entry whose command text is empty after trimming — e.g. a config file with `command = ""`, or a command consisting solely of comments/whitespace.
Common situations: Mis-edited config where the command line was deleted but the resolver entry kept; environment substitution producing an empty command; copy-paste that dropped the actual program path.
Related errors
- resolver {} returned empty output for {}
- invalid lifecycle.domains.engine '{}': expected 'docker' or
- repos root is immutable; use {} or {} or set {}=1 to overrid
- lifecycle.domains.aliases[].host is required
- lifecycle.domains.aliases[].target is required
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/a8be00d0860da1bf.
Report an issue: GitHub.