Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Dec 4, 2025

Summary

Replace all user content wrapper tags (<task>, <feedback>, <answer>, <user_message>) with a single unified <user_message> tag and strip all accompanying explanatory blurbs.

Implementation Details

Based on plan: docs/plans/unify-user-message-tags.md

Changes Made

File Changes
src/core/mentions/processUserContentMentions.ts Simplified shouldProcessMentions() to only detect <user_message>
src/core/prompts/responses.ts Updated 3 functions: removed blurbs from XML, removed message field from native protocol JSON
src/core/task/Task.ts Changed initial task and continuation wrappers to use <user_message>
src/core/tools/AttemptCompletionTool.ts Removed blurb, changed <feedback> to <user_message>
src/core/tools/AskFollowupQuestionTool.ts Changed <answer> to <user_message>
src/core/tools/ExecuteCommandTool.ts Removed blurb, changed <feedback> to <user_message> for running commands

Test Updates

  • Updated processUserContentMentions.spec.ts - all tags changed to <user_message>
  • Updated Task.spec.ts - test descriptions and assertions updated
  • Updated task-tool-history.spec.ts - example text updated
  • Updated readFileTool.spec.ts - test assertions updated

Breaking Changes

  1. Old task history: Tasks saved before this change that contain <task>, <feedback>, or <answer> tags in their API history will no longer have mentions re-parsed if the task is resumed.

  2. LLM context: Models will no longer receive explicit blurbs explaining the nature of user input. The model must infer context from:

    • The tool_result status field (in native protocol)
    • The surrounding conversation context

Testing

All unit tests pass successfully.

Replace all user content wrapper tags (<task>, <feedback>, <answer>, <user_message>)
with a single unified <user_message> tag and strip all accompanying explanatory blurbs.

Changes:
- processUserContentMentions.ts: Simplified shouldProcessMentions() to only detect <user_message>
- responses.ts: Updated toolDeniedWithFeedback(), toolApprovedWithFeedback(), tooManyMistakes()
  - Removed explanatory blurbs from XML output
  - Removed 'message' field from native protocol JSON
- Task.ts: Changed initial task and continuation wrappers to use <user_message>
- AttemptCompletionTool.ts: Removed blurb, changed <feedback> to <user_message>
- AskFollowupQuestionTool.ts: Changed <answer> to <user_message>
- Updated all related test files

Breaking changes:
- Old task history with <task>, <feedback>, or <answer> tags will no longer have mentions re-parsed
- Models no longer receive explicit blurbs explaining the nature of user input
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 4, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 4, 2025

Oroocle Clock   Follow along on Roo Cloud

Taking a look at your PR now. Feedback coming shortly!

Previous reviews

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

Previous reviews

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 Dec 4, 2025
- src/services/command/built-in-commands.ts: Change <task> to <user_message> in init command
- src/core/tools/ExecuteCommandTool.ts: Change <feedback> to <user_message> for running command feedback
- src/core/mentions/processUserContentMentions.ts: Update comment to reflect new tag
- src/core/tools/__tests__/readFileTool.spec.ts: Update mock implementations

Note: <task> tags in fetch_instructions tool remain unchanged as they are
XML tool parameters (parameter name = 'task'), not user content wrappers.
Per user feedback, keep the explanatory blurbs before the user content:
- toolDeniedWithFeedback: 'The user denied this operation and responded with the message:'
- toolApprovedWithFeedback: 'The user approved this operation and responded with the message:'
- tooManyMistakes: 'You seem to be having trouble proceeding...'

Native protocol still uses status field in JSON for context.
@RooCodeInc RooCodeInc deleted a comment from github-actions bot Dec 4, 2025
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. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants