Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/rlm/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,20 @@ def build_system_prompt(
if active_tools:
parts.extend(["", "Call at most one built-in tool per turn."])

active_tool_names = {tool.name for tool in active_tools}
if "bash" in active_tool_names:
parts.extend(
[
"",
"When you are confident the task is complete and verified, signal the"
" end of the rollout by issuing exactly one `bash` tool call with the"
" command:",
"",
' echo "TASK_FINISHED"',
"",
"Emit no further tool calls or text after this. You cannot continue"
" working on this task after submitting.",
]
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Contradictory "stop calling tools" vs TASK_FINISHED instructions

Medium Severity

The new TASK_FINISHED ritual (issue a bash tool call when done) directly contradicts the existing instruction on line 29: "When you are done, stop calling tools and state your final answer." When bash is active, the system prompt now tells the model both to stop calling tools and to call the bash tool when the task is complete. This conflicting guidance is likely to confuse the model and reduce the adoption rate of the new stop ritual that the PR is specifically trying to achieve.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7543f14. Configure here.


return "\n".join(parts)
Loading