Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 8, 2026

This PR fixes the issue where slash commands typed at subtask approval prompts were incorrectly treated as denial feedback instead of being executed.

Changes

  • Added detection for slash commands (text starting with /) in the askApproval function
  • Slash commands are now treated as simple denials without feedback, preventing them from being captured as feedback text to the model
  • Applied the fix to both the tool approval flow and MCP tool approval flow in presentAssistantMessage.ts

Problem

When a user typed a slash command (e.g., /done) at the attempt_completion approval prompt (the "finishTask" approval dialog) in a subtask, the slash command was processed as denial feedback instead of being executed. This meant users could not use slash commands while at the subtask completion approval prompt.

Solution

The askApproval function now checks if the text starts with / before treating it as feedback. If it does, it treats it as a simple denial (similar to clicking the deny button without text), which allows the slash command to be processed correctly by the message handling system.

Testing

  • Verified the code follows existing patterns in the codebase
  • Changes are minimal and focused on the specific issue
  • No existing functionality is affected - regular text feedback still works as before

View task on Roo Code Cloud


Important

Fixes slash command handling in subtask approval prompts by treating them as simple denials without feedback in presentAssistantMessage.ts.

  • Behavior:
    • Fixes issue where slash commands in subtask approval prompts were treated as denial feedback instead of being executed.
    • In presentAssistantMessage.ts, askApproval function now checks if text starts with / and treats it as a simple denial without feedback.
    • Applied to both tool approval flow and MCP tool approval flow.
  • Testing:
    • Verified minimal changes follow existing patterns.
    • Ensures no impact on existing functionality; regular text feedback remains unaffected.

This description was created by Ellipsis for 3b1c21c. You can customize this summary. It will automatically update as commits are pushed.

…approval prompts

- Add detection for slash commands (text starting with /) in askApproval function
- Treat slash commands as simple denials without feedback to prevent them from being captured as feedback text
- Applied fix to both tool approval and MCP tool approval flows
- Resolves ROO-421
@roomote
Copy link
Contributor Author

roomote bot commented Jan 8, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The changes correctly add detection for slash commands in approval prompts, preventing them from being captured as denial feedback. The fix is applied consistently to both the tool approval and MCP tool approval flows.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jan 8, 2026
@daniel-lxs daniel-lxs closed this Jan 8, 2026
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jan 8, 2026
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jan 8, 2026
@daniel-lxs daniel-lxs deleted the feature/ROO-421-slash-commands-approval branch January 8, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants