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.
- 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.
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
When tools are called in parallel (e.g., update_todo_list + new_task),
the tool results accumulate in userMessageContent but aren't saved to
API history until all tools complete. When new_task triggers delegation,
the parent is disposed before these pending results are saved, causing
400 errors when the parent resumes (missing tool_result for tool_use).
This fix:
- Adds flushPendingToolResultsToHistory() method in Task.ts that saves
pending userMessageContent to API history
- Calls this method in delegateParentAndOpenChild() before disposing the
parent task
- Safe for both native/XML protocols and sequential/parallel execution
(returns early if there's nothing to flush)
- Import resolveToolProtocol and TOOL_PROTOCOL from @roo-code/types
- Add tools and tool_choice to completion params when native protocol is enabled
- Handle tool_call_partial chunks in streaming response
- Add comprehensive tests for native tool support
* feat: add model-specific tool customization via excludedTools and includedTools
- Add excludedTools and includedTools to ModelInfo schema
- Implement applyModelToolCustomization helper to filter tools based on model config
- Integrate model tool filtering into filterNativeToolsForMode for native protocol
- Add comprehensive tests for tool customization functionality
- Wire up modelInfo through buildNativeToolsArray and Task.ts
This allows providers to override which native tools are available on a per-model basis via MODEL_DEFAULTS, enabling better control over tool selection for models with specific needs.
* feat: add customTools for opt-in only tools
- Add customTools array to ToolGroupConfig for defining opt-in only tools
- Update getToolsForMode() to exclude customTools from default tool set
- Modify applyModelToolCustomization() to include customTools only via includedTools
- Add tests for customTools functionality
- Add comprehensive documentation with usage examples
customTools allows defining tools that are NOT available by default,
even when a mode includes their group. These tools are only available
when explicitly included via a model's includedTools configuration.
This enables:
- Gradual rollout of experimental tools
- Model-specific specialized capabilities
- Safe experimentation without affecting default tool sets
* Add assertions for customTools tests per review feedback
* test: add tests for including customTools via includedTools
* Update src/core/prompts/tools/__tests__/filter-tools-for-mode.spec.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>