Skip to content

Conversation

@angiejones
Copy link
Collaborator

@angiejones angiejones commented Jan 13, 2026

Summary

When invoking a recipe via slash command, the recipe's subrecipes and response schema were not being registered with the agent. This caused 'Unknown subrecipe' errors when goose tried to use subrecipes defined in the recipe.

Problem

The handle_recipe_command function in execute_commands.rs was only extracting the instructions and prompt text from the recipe and returning it as a user message. It never called apply_recipe_components() to register subrecipes with the agent.

This meant that when a recipe defined sub_recipes, they were completely ignored in the slash command flow.

Comparing the different recipe invocation paths:

Path Subrecipes Loaded?
CLI (goose run --recipe) ✅ Yes
Desktop (recipe picker) ✅ Yes
Subagent ✅ Yes
Slash command No (bug)

Fix

Added a call to apply_recipe_components() in handle_recipe_command() after building the recipe, matching the behavior of other recipe invocation paths.

Testing

  • Verified the code compiles
  • Ran existing subagent and recipe tests - all pass
  • This is a targeted fix that only affects the slash command path
image

When invoking a recipe via slash command (e.g., /research), the recipe's
subrecipes and response schema were not being registered with the agent.
This caused 'Unknown subrecipe' errors when the LLM tried to use subrecipes
defined in the recipe.

The fix adds a call to apply_recipe_components() in handle_recipe_command(),
matching the behavior of other recipe invocation paths (CLI, Desktop recipe
picker, subagent handler).

Fixes the issue where slash command recipes with sub_recipes defined would
fail with 'Unknown subrecipe. Available: ' (empty list).
Copilot AI review requested due to automatic review settings January 13, 2026 05:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where subrecipes and response schemas defined in recipes were not being registered when invoking recipes via slash commands (e.g., /research). The fix adds a call to apply_recipe_components() in the slash command handler to match the behavior of other recipe invocation paths (CLI, desktop, subagent).

Changes:

  • Added apply_recipe_components() call in handle_recipe_command() to register subrecipes and response schemas with the agent before processing the recipe

Copilot AI review requested due to automatic review settings January 13, 2026 05:13
@angiejones angiejones changed the title fix: apply recipe components (subrecipes) when using slash commands fix: apply subrecipes when using slash commands Jan 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@angiejones angiejones merged commit 237f1c2 into main Jan 13, 2026
26 checks passed
@angiejones angiejones deleted the fix/slash-command-subrecipes branch January 13, 2026 05:55
fbalicchia pushed a commit to fbalicchia/goose that referenced this pull request Jan 13, 2026
zanesq added a commit that referenced this pull request Jan 13, 2026
…ased

* 'main' of github.com:block/goose: (23 commits)
  Use Intl.NumberFormat for token formatting in SessionsInsights (#6466)
  feat(ui): format large and small token counts for readability (#6449)
  fix: apply subrecipes when using slash commands (#6460)
  Fix: exclude platform_schedule_tool in CLI (#6442)
  Fix: Small update in how ML-based prompt injection determines final result (#6439)
  docs: remove SSE transport and rename to Streamable HTTP (#6319)
  fix: correct Cloudinary extension command and env variable (#6453)
  fix: add gap between buttons in MacDesktopInstallButtons.js (#6452)
  refactor: include hidden dotfiles folders in file picker search (#6315)
  upgraded safe npm packages (#6450)
  chore(deps): bump react-router and react-router-dom in /ui/desktop (#6408)
  chore(deps): bump lru from 0.12.5 to 0.16.3 (#6379)
  chore(deps-dev): bump @modelcontextprotocol/sdk from 1.24.0 to 1.25.2 in /ui/desktop (#6375)
  fix: inconsistent API url requirement between desktop and CLI versions (#6419)
  feat(vertexai): Add streaming support (#6409)
  fix deeplink recipe launch cold start (#6210)
  Spell check setting (#6446)
  File bug directly (#6413)
  fix(cli): incorrect bin name in shell completions (#6444)
  Use crunchy from crates instead of git fork (#6415)
  ...
wpfleger96 added a commit that referenced this pull request Jan 13, 2026
* main: (41 commits)
  Allow customizing the new line keybinding in the CLI (#5956)
  Ask for permission in the CLI (#6475)
  docs: add Ralph Loop tutorial for multi-model iterative development (#6455)
  Remove gitignore fallback from gooseignore docs (#6480)
  fix: clean up result recording for code mode (#6343)
  fix(code_execution): handle model quirks with tool calls (#6352)
  feat(ui): support prefersBorder option for MCP Apps (#6465)
  fixed line breaks (#6459)
  Use Intl.NumberFormat for token formatting in SessionsInsights (#6466)
  feat(ui): format large and small token counts for readability (#6449)
  fix: apply subrecipes when using slash commands (#6460)
  Fix: exclude platform_schedule_tool in CLI (#6442)
  Fix: Small update in how ML-based prompt injection determines final result (#6439)
  docs: remove SSE transport and rename to Streamable HTTP (#6319)
  fix: correct Cloudinary extension command and env variable (#6453)
  fix: add gap between buttons in MacDesktopInstallButtons.js (#6452)
  refactor: include hidden dotfiles folders in file picker search (#6315)
  upgraded safe npm packages (#6450)
  chore(deps): bump react-router and react-router-dom in /ui/desktop (#6408)
  chore(deps): bump lru from 0.12.5 to 0.16.3 (#6379)
  ...
lifeizhou-ap added a commit that referenced this pull request Jan 14, 2026
* main:
  fix: require auth when running goose on non loopback address (#6478)
  chore(deps): bump hono from 4.11.3 to 4.11.4 in /ui/desktop (#6485)
  feat(cli): graceful fallback for keyring failures (#5808)
  fix: support global .gooseignore and negation patterns (#6157)
  docs: manual config for jetbrains (#6490)
  fix: Recipe slash command doesn't work with single optional parameter (#6235)
  fix(openrouter): Handle Gemini thoughtSignature for tool calls (#6370)
  docs: fix extensions page (#6484)
  Allow customizing the new line keybinding in the CLI (#5956)
  Ask for permission in the CLI (#6475)
  docs: add Ralph Loop tutorial for multi-model iterative development (#6455)
  Remove gitignore fallback from gooseignore docs (#6480)
  fix: clean up result recording for code mode (#6343)
  fix(code_execution): handle model quirks with tool calls (#6352)
  feat(ui): support prefersBorder option for MCP Apps (#6465)
  fixed line breaks (#6459)
  Use Intl.NumberFormat for token formatting in SessionsInsights (#6466)
  feat(ui): format large and small token counts for readability (#6449)
  fix: apply subrecipes when using slash commands (#6460)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants