{"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":"error","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/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/agent_ui/src/message_editor.rs#L785-L821","documentation":"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.","triggerScenarios":"Thrown at crates/agent_ui/src/message_editor.rs:803 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove or correct the leading slash so the text is sent as a plain message","Pick one of the listed available commands or skills by its exact name (including any namespace prefix before the colon)","If a same-named skill was intended, resolve its fully scoped name instead of the bare command name"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}