zed-industries/zed · warning
/{command_name} is not a recognized command in {agent_id}. M
Error message
/{command_name} is not a recognized command in {agent_id}. Messages that start with `/` are interpreted as commands.
If you are trying to send a message and not run a command, try preceding the `/` with a space.
Available commands for {agent_id}: {commands} What it means
In the message editor, any message starting with '/' is interpreted as a command. Before sending, the name is matched against the active agent's available commands and loaded skills — either directly (name) or scoped (source:name). No match produces this error, which also lists the valid commands so the user can correct the input.
Source
Thrown at crates/agent_ui/src/message_editor.rs:803
// branch, every autocomplete pick of a same-named
// skill would be rejected as "not supported"
// before reaching the resolver.
let direct_match = available_commands
.iter()
.any(|available_command| available_command.name == command_name)
|| available_skills
.iter()
.any(|skill| skill.name.as_ref() == command_name);
let scope_match = !direct_match
&& command_name.rsplit_once(':').is_some_and(|(scope, bare)| {
!bare.is_empty()
&& available_skills.iter().any(|skill| {
skill.name.as_ref() == bare && skill.source.as_ref() == scope
})
});
if !direct_match && !scope_match {
return Err(anyhow!(indoc::formatdoc!(
"/{command_name} is not a recognized command in {agent_id}. \
Messages that start with `/` are interpreted as commands.
If you are trying to send a message and not run a command, \
try preceding the `/` with a space.
Available commands for {agent_id}: {commands}",
commands =
Self::format_available_commands(available_commands, available_skills),
)));
}
}
}
Ok(())
}
/// Render the available-commands list for error messages. Trusted native skills
/// are shown in their qualified `/<scope>:<name>` form so usersView on GitHub (pinned to bc538def45)
Solutions
- Read the 'Available commands' list in the error and use one of those names.
- Precede the '/' with a space to send the input as a literal message instead of a command.
- Fix typos; for a skill from a specific source use the scope:name form.
- Install or enable the missing skill, or switch to the agent that provides the command.
Defensive patterns
Strategy: validation
Validate before calling
let direct = available_commands.iter().any(|c| c.name == command_name)
|| available_skills.iter().any(|s| s.name.as_ref() == command_name);
let scoped = !direct
&& command_name.rsplit_once(':').is_some_and(|(scope, bare)| {
!bare.is_empty()
&& available_skills
.iter()
.any(|s| s.name.as_ref() == bare && s.source.as_ref() == scope)
});
if !(direct || scoped) {
// open the command picker instead of submitting
} Type guard
fn is_recognized_command(
command_name: &str,
available_commands: &[Command],
available_skills: &[Skill],
) -> bool {
available_commands.iter().any(|c| c.name == command_name)
|| available_skills.iter().any(|s| s.name.as_ref() == command_name)
|| command_name.rsplit_once(':').is_some_and(|(scope, bare)| {
!bare.is_empty()
&& available_skills
.iter()
.any(|s| s.name.as_ref() == bare && s.source.as_ref() == scope)
})
} Prevention
- Autocomplete from the actual command and skill list as the user types '/'.
- Show how the input will be interpreted (command vs literal message) before submit.
- Re-validate at submit time so a stale list does not produce false negatives.
- Offer the leading-space escape as a quick fix in the error UI.
When it happens
Trigger: Typing a misspelled command; using a command that belongs to a different agent; referencing a skill that is not installed or failed to load; using the scope:name form with the wrong scope or an empty bare name.
Common situations: Switching between the native agent and ACP agents that have different command sets; skills not enabled in the current context; muscle-memory command names from other CLI tools.
Related errors
- project path not found for symbol mention {abs_path:?}
- Failed to read skill file {}: {}
- Thread mentions are only supported for the native agent
- no active repository
- project path not found for directory mention {abs_path:?}
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/dbce33a765c7e07e.
Report an issue: GitHub.