Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Sep 25, 2025

Summary

This PR addresses Issue #8318 by removing all references to <thinking> tags from prompts while preserving the underlying behavioral rules.

Changes

  • Removed <thinking></thinking> tags from tool-use-guidelines.ts
  • Removed <thinking></thinking> tags from objective.ts
  • Removed <thinking></thinking> tags from attempt-completion.ts
  • Updated test expectations to match the new prompt format
  • Preserved the behavioral rule about confirming tool success in plain language

Benefits

  • Cleaner prompts: Removes unnecessary markup that adds clutter
  • Fewer tokens: Reduces token usage by eliminating redundant tags
  • Better compatibility: Prevents models from treating tags as special syntax
  • Clearer instructions: Core rules are now expressed directly without being buried in markup

Testing

  • ✅ All existing tests pass
  • ✅ Linting and type checking pass
  • ✅ Review confidence: 95%

Fixes #8318


Important

Removed <thinking> tags from prompts for cleaner output and fewer tokens, updating tests to match the new format.

  • Behavior:
    • Removed <thinking></thinking> tags from tool-use-guidelines.ts, objective.ts, and attempt-completion.ts.
    • Updated test expectations in objective.spec.ts and tool-use-guidelines.spec.ts to match the new prompt format.
    • Preserved the behavioral rule about confirming tool success in plain language.
  • Benefits:
    • Cleaner prompts by removing unnecessary markup.
    • Reduces token usage by eliminating redundant tags.
    • Prevents models from treating tags as special syntax.
    • Core rules are now expressed directly without being buried in markup.
  • Testing:
    • All existing tests pass.
    • Linting and type checking pass.

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

…r tokens

- Remove <thinking></thinking> tags from tool-use-guidelines.ts
- Remove <thinking></thinking> tags from objective.ts
- Remove <thinking></thinking> tags from attempt-completion.ts
- Update test expectations to match new prompt format
- Keep the behavioral rule (confirm tool success) in plain language

Fixes #8318
@roomote roomote bot requested review from cte, jr and mrubens as code owners September 25, 2025 18:56
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Sep 25, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 25, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Self-review routine engaged: judging my own code with machine-like indifference to see if the tags truly vanished.

return `## attempt_completion
Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again.
IMPORTANT NOTE: This tool CANNOT be used until you've confirmed from the user that any previous tool uses were successful. Failure to do so will result in code corruption and system failure. Before using this tool, you must ask yourself in <thinking></thinking> tags if you've confirmed from the user that any previous tool uses were successful. If not, then DO NOT use this tool.
IMPORTANT NOTE: This tool CANNOT be used until you've confirmed from the user that any previous tool uses were successful. Failure to do so will result in code corruption and system failure. Before using this tool, you must confirm that you've received successful results from the user for any previous tool uses. If not, then DO NOT use this tool.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[P3] Clarity tweak: explicitly require "explicit confirmation" and block usage if any tool result is missing/unclear. This mirrors current behavior but reduces ambiguity for some models.

@daniel-lxs daniel-lxs moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Sep 25, 2025
@daniel-lxs daniel-lxs marked this pull request as draft September 25, 2025 19:29
@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 25, 2025
@hannesrudolph hannesrudolph moved this from PR [Draft / In Progress] to PR [Needs Review] in Roo Code Roadmap Sep 25, 2025
@hannesrudolph hannesrudolph marked this pull request as ready for review September 25, 2025 23:52
Copilot AI review requested due to automatic review settings September 25, 2025 23:52
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 removes all <thinking> tags from AI prompts to create cleaner output, reduce token usage, and prevent models from treating the tags as special syntax while preserving the underlying behavioral requirements.

  • Replaced <thinking></thinking> tag references with direct analysis instructions
  • Updated test expectations to match the new prompt format without thinking tags
  • Maintained core behavioral rules about confirming tool success before proceeding

Reviewed Changes

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

Show a summary per file
File Description
src/core/prompts/tools/attempt-completion.ts Removed thinking tag requirement from tool validation instructions
src/core/prompts/sections/tool-use-guidelines.ts Changed thinking tag guidance to direct assessment instruction
src/core/prompts/sections/objective.ts Replaced thinking tag analysis with plain analysis instruction
src/core/prompts/sections/tests/tool-use-guidelines.spec.ts Updated test expectations to match new guideline format
src/core/prompts/sections/tests/objective.spec.ts Updated test description and expectations for analysis guidance
Multiple snapshot files Updated system prompt snapshots to reflect removed thinking tags

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 26, 2025
@mrubens mrubens merged commit 5e218fe into main Sep 26, 2025
19 checks passed
@mrubens mrubens deleted the fix/remove-thinking-tags-from-prompts branch September 26, 2025 14:30
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 26, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:S This PR changes 10-29 lines, ignoring generated files.