{"record":{"id":"dbce33a765c7e07e","repo":"zed-industries/zed","slug":"command-name-is-not-a-recognized-command-in-ag","errorCode":null,"errorMessage":"/{command_name} is not a recognized command in {agent_id}. Messages that start with `/` are interpreted as commands.\n\nIf you are trying to send a message and not run a command, try preceding the `/` with a space.\n\nAvailable commands for {agent_id}: {commands}","messagePattern":"/(.+?) is not a recognized command in (.+?)\\. Messages that start with `/` are interpreted as commands\\.\n\nIf you are trying to send a message and not run a command, try preceding the `/` with a space\\.\n\nAvailable commands for (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/agent_ui/src/message_editor.rs","lineNumber":803,"sourceCode":"                //    branch, every autocomplete pick of a same-named\n                //    skill would be rejected as \"not supported\"\n                //    before reaching the resolver.\n                let direct_match = available_commands\n                    .iter()\n                    .any(|available_command| available_command.name == command_name)\n                    || available_skills\n                        .iter()\n                        .any(|skill| skill.name.as_ref() == command_name);\n                let scope_match = !direct_match\n                    && command_name.rsplit_once(':').is_some_and(|(scope, bare)| {\n                        !bare.is_empty()\n                            && available_skills.iter().any(|skill| {\n                                skill.name.as_ref() == bare && skill.source.as_ref() == scope\n                            })\n                    });\n\n                if !direct_match && !scope_match {\n                    return Err(anyhow!(indoc::formatdoc!(\n                        \"/{command_name} is not a recognized command in {agent_id}. \\\n                         Messages that start with `/` are interpreted as commands.\n\n                         If you are trying to send a message and not run a command, \\\n                         try preceding the `/` with a space.\n\n                         Available commands for {agent_id}: {commands}\",\n                        commands =\n                            Self::format_available_commands(available_commands, available_skills),\n                    )));\n                }\n            }\n        }\n        Ok(())\n    }\n\n    /// Render the available-commands list for error messages. Trusted native skills\n    /// are shown in their qualified `/<scope>:<name>` form so users","sourceCodeStart":785,"sourceCodeEnd":821,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/agent_ui/src/message_editor.rs#L785-L821","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let direct = available_commands.iter().any(|c| c.name == command_name)\n    || available_skills.iter().any(|s| s.name.as_ref() == command_name);\nlet scoped = !direct\n    && command_name.rsplit_once(':').is_some_and(|(scope, bare)| {\n        !bare.is_empty()\n            && available_skills\n                .iter()\n                .any(|s| s.name.as_ref() == bare && s.source.as_ref() == scope)\n    });\nif !(direct || scoped) {\n    // open the command picker instead of submitting\n}","typeGuard":"fn is_recognized_command(\n    command_name: &str,\n    available_commands: &[Command],\n    available_skills: &[Skill],\n) -> bool {\n    available_commands.iter().any(|c| c.name == command_name)\n        || available_skills.iter().any(|s| s.name.as_ref() == command_name)\n        || command_name.rsplit_once(':').is_some_and(|(scope, bare)| {\n            !bare.is_empty()\n                && available_skills\n                    .iter()\n                    .any(|s| s.name.as_ref() == bare && s.source.as_ref() == scope)\n        })\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["zed","agent-ui","slash-commands","user-input","skills"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}