Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fd81f9a. Configure here.
| self.system_prompt_manager.set_block( | ||
| "operational_instructions", | ||
| f"{existing}\n\n{self.instructions}" if existing else self.instructions, | ||
| ) |
There was a problem hiding this comment.
User instructions lack Jinja raw wrapping unlike role
Medium Severity
The new self.instructions content is injected directly into the operational_instructions Jinja template block without {% raw %}...{% endraw %} wrapping. The role field has explicit protection against unintended Jinja rendering (lines 1591–1595), but instructions does not. If a user provides instructions containing {{ }} or {% %} syntax (e.g., "Use format {{ name }}: {{ value }}"), the Jinja renderer will attempt variable substitution, likely causing an UndefinedError or silently producing incorrect prompt content.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit fd81f9a. Configure here.


Note
Medium Risk
Changes core agent prompt composition (new blocks, renamed sections, and different tool/instruction text), which can materially alter model behavior across agents. Low implementation complexity, but broad behavioral impact should be validated with regression prompt tests.
Overview
Refactors agent prompt building to support a new
instructionsfield onAgentthat appends user-provided text into theoperational_instructionsblock during_init_prompt_blocks().Reworks the ReAct prompt manager/template structure: renames
secondary_instructionstooperational_instructions, splits sandbox guidance into a dedicatedenvironmentblock, and updates the baseAGENT_PROMPT_TEMPLATEto a numbered/sectioned format with new behaviour/task guidance.Adjusts ReAct prompt constants to be more concise and standardized (markdown headings), introduces
REACT_BLOCK_TOOLS_BRIEF, and switches function-calling mode to use the brief tools block instead of the prior no-formats tools listing.Reviewed by Cursor Bugbot for commit fd81f9a. Bugbot is set up for automated code reviews on this repo. Configure here.