fix(prompt): make root agent orchestrate-only and fold fixing into reporting#827
Merged
Merged
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
Greptile SummaryThis PR makes the root agent orchestration-only and folds white-box fixing into reporting. The main changes are:
Confidence Score: 4/5The white-box remediation path can complete without producing, applying, or testing a fix.
strix/agents/prompts/system_prompt.jinja and the create_vulnerability_report validation path Important Files Changed
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
strix/agents/prompts/system_prompt.jinja:137
**Inline Fix Can Be Omitted**
A reporting agent can call `create_vulnerability_report` without `code_locations` or `fix_pr_body` because both fields remain optional and the tool accepts the report. With the separate fixing agent removed, that successful call ends the workflow without a machine-actionable patch or SARIF fix.
### Issue 2 of 2
strix/agents/prompts/system_prompt.jinja:138
**Confirmed Findings Remain Unpatched**
The phrase `If you also apply and verify` makes source modification and retesting optional. A reporting agent can derive an inline suggestion, file the report, and stop; because this change removes the fixing agent, the vulnerable workspace remains unchanged and the proposed fix is never validated.
Reviews (1): Last reviewed commit: "fix(prompt): make root agent orchestrate..." | Re-trigger Greptile |
0xallam
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two prompt-level fixes flagged by a user running black-box scans with Opus/Sonnet:
1. Root agent was doing hands-on testing before delegating.
system_prompt.jinjais shared by the root and all subagents and is written in the second person ("map the target", "COMPLETE full reconnaissance", "spray payloads", "Start with BASIC techniques"). The only counter-signal was one smallROOT AGENT ROLEblock whose loophole ("may do lightweight triage, quick verification") the models read as license to run basic injection tests on discovered endpoints before spinning up a subagent. Crucially,is_rootwas never passed into the Jinja render, so the base prompt could not distinguish root from child.prompt.py: passis_rootintorender(...).system_prompt.jinja: add anis_root-gated<root_agent_directive>at the top telling the root it is orchestration-only and how to read the rest of the prompt (every hands-on "you" instruction = a delegation requirement → spawn a subagent); add anis_root-gated note on MANDATORY INITIAL PHASES; close the "lightweight triage/quick verification" loophole (explicit: no scanners/fuzzers/payloads/"basic" endpoint probing — delegate anything that touches the target).skills/coordination/root_agent.md: same no-hands-on-testing reinforcement; clarify "analyze the target" means from scan config/scope + subagent results, not by running recon tools.2. Fixing happened as a separate agent after reporting, wasting tokens.
create_vulnerability_reportalready forces the reporting agent to derive the concrete patch inline (code_locationswith verbatimfix_before/fix_after+fix_pr_body). The prompt nevertheless mandated a downstream "Fixing Agent" that re-reads the code and re-derives the same patch. Reworked so fixing is folded into reporting:Discovery → Validation → Reporting → Fixing (4 agents)→Discovery → Validation → Reporting-with-fix (3 agents).→ Create "Auth Fixing Agent"step and the trailingSpawns "Auth Fixing Agent"in the workflow diagram (nowSTOP - no separate fixing agent).FIX discovered vulnerabilities …bullets to derive/apply the fix in the same agent/turn as reporting.Notes
is_rootgating is behavioral for the template; child/subagent prompts are unchanged except the fix-ordering wording.is_rootgating present only for root, ruff + pre-commit hooks (ruff/mypy/bandit) pass. The 2 pre-existingPLC0415lint errors inreport/state.py/telemetry/logging.pyare onmainalready and untouched here.Link to Devin session: https://app.devin.ai/sessions/b82ddd52d14940f18ccee6d915888fc9
Requested by: @0xallam