zed-industries/zed · error

/ is not a recognized command in . Messages that start with…

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

validate_slash_commands rejected a `/command` that matches neither the agent's available commands nor its skills (directly or via scoped names); the message lists the agent's available commands and hints at escaping with a leading space.

Solutions

  1. Remove or correct the leading slash so the text is sent as a plain message
  2. Pick one of the listed available commands or skills by its exact name (including any namespace prefix before the colon)
  3. If a same-named skill was intended, resolve its fully scoped name instead of the bare command name
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/agent_ui/src/message_editor.rs:803 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/dbce33a765c7e07e. Report an issue: GitHub.

Appendix: 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 users

View on GitHub (pinned to f4178619ac)