nikivdev/code · error
{} has no exec.run argv in {}
Error message
{} has no exec.run argv in {} What it means
Thrown by `Commander::command` when the referenced manifest declares an empty `exec.run` argv list, so there is no external command to spawn. The library requires every external CLI manifest to specify at least one argv entry before it can invoke the tool. It names both the manifest id and the manifest file path to make the offending file easy to locate.
Source
Thrown at src/external_cli.rs:204
let status = command.status().with_context(|| {
format!(
"failed to launch external CLI {} from {}",
id,
tool.manifest_path.display()
)
})?;
ensure_success(id, status)
}
impl ResolvedExternalCliTool {
pub fn command<I, S>(&self, args: I) -> Result<Command>
where
I: IntoIterator<Item = S>,
S: AsRef<str>,
{
if self.manifest.exec.run.is_empty() {
bail!(
"{} has no exec.run argv in {}",
self.manifest.id,
self.manifest_path.display()
);
}
let mut argv = self.manifest.exec.run.iter();
let Some(program) = argv.next() else {
bail!(
"{} has no exec.run program in {}",
self.manifest.id,
self.manifest_path.display()
);
};
let mut command = Command::new(program);
command.current_dir(&self.source_root);
command.args(argv);View on GitHub (pinned to a747e741ae)
Solutions
- Add a non-empty `exec.run` argv array to the manifest (program first, then arguments), e.g. `run = ["my-tool"]`.
- Verify you are pointing at the intended manifest file (the path is shown in the message) — you may be reading a stub or partial manifest.
- Re-install or re-link the tool if its manifest was corrupted, so a valid manifest is written.
Example fix
# before (tool.toml) [exec] run = [] # after [exec] run = ["my-cli", "--verbose"]
Defensive patterns
Strategy: validation
Validate before calling
fn validate_exec_run(manifest: &ExternalCliManifest) -> Result<(), String> {
if manifest.exec.run.is_empty() {
return Err(format!("manifest {} has empty exec.run", manifest.id));
}
Ok(())
} Type guard
fn has_exec_run(manifest: &ExternalCliManifest) -> bool {
!manifest.exec.run.is_empty()
} Try / catch
match cmd.commander.command(&args) {
Ok(cmd) => cmd,
Err(e) if e.to_string().contains("no exec.run argv") => {
eprintln!("manifest missing exec.run: {e}");
return Err(e);
}
Err(e) => return Err(e),
} Prevention
- Always define a non-empty `exec.run` argv in every manifest.
- Validate manifests with a linter/schema check before registering them.
- Use manifest templates that require the `run` field.
- Test each manifest by resolving and dry-running the tool in CI.
When it happens
Trigger: Calling `commander.command([...])` where `self.manifest.exec.run` is an empty vector — e.g. a manifest TOML that omits the `[exec] run = [...]` entry or sets `run = []`.
Common situations: Hand-written manifest missing the `exec.run` key entirely; manifest generated by a template with a placeholder left empty; manifest edited to comment out the run argv while keeping the tool registered.
Related errors
- {} has no exec.run program in {}
- external CLI tool {} not found under {}
- multiple external CLI manifests matched {}: {}
- unsupported external CLI manifest version {} in {}
- Missing GEMINI_API_KEY/GOOGLE_API_KEY (set env var or add to
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/e081cfb446f6ee6a.
Report an issue: GitHub.