Hi Everyone! I am trying to automate the vulnerabi...
# questions
t
Hi Everyone! I am trying to automate the vulnerability fixes in my docker images. So i am using openhands installed via openhands-ai using pip. Whenever there is vulnerability the automation triggers and the openhands tries to fix the vulnerability. Question is: openhands fixes the vulnerability, scans the image if the vulnerability is not fixed then is it better to check again with the openhands to fix the vulnerability as it is not fixed or just exits the automation saying openhands unable to solve. As the previous attempt failed it may not be able to fix in second iteration also. Just wanted to know (This iteration also costs tokens and i dont want to waste if iteration doesnot works.)
i
Great question....First, you can control spend with max_iterations and max_budget_per_task.. in the resolver flow, max_iterations is available and defaults to 50. If helpful, I’m happy to add token credits so you can test this more robustly without concern.
@nutritious-balloon-65098 can you make sure this is true
n
I'm on it! Owen can track my progress here.
## Summary I have not performed any concrete work yet in this session. Here's what occurred: Activity: - You asked me to "make sure this is true" without specifying what you wanted verified - I responded by asking for clarification about what specifically you'd like me to check Status: - ✗ No verification performed - awaiting clarification on what needs to be verified - ✗ No code changes made - ✗ No configuration checked - ✗ No files modified Next Steps: To proceed, I need you to specify what you'd like me to verify. This could be: - Information from the earlier conversation about vulnerability fixes and OpenHands - A specific file, configuration, or setting - Documentation or code - Or something else entirely Once you clarify what needs to be verified, I'll be able to help you check it.
i
@nutritious-balloon-65098 can you control spend with max_iterations and max_budget_per_task.. in the resolver flow does max_iterations is available and defaults to 50?
n
# Final Summary I investigated whether you can control spend with
max_iterations
and
max_budget_per_task
in the OpenHands resolver flow, and whether
max_iterations
defaults to 50. ## Answer Partially True: ✅
max_iterations
- CONFIRMED TRUE
- IS available in the resolver flow - DOES default to 50 - Can be set via CLI argument (
--max-iterations
) or GitHub Actions workflow input - Evidence found in
openhands/resolver/resolve_issue.py
and
.github/workflows/openhands-resolver.yml
❌
max_budget_per_task
- NOT AVAILABLE in resolver
- Exists in general OpenHands settings API but NOT in the resolver flow specifically - Not available as a CLI argument in
resolve_issue.py
- Not an input parameter in the GitHub Actions resolver workflow ## Bottom Line You can control resolver iterations (defaults to 50), but not budget directly through the resolver interface. For your vulnerability fix automation use case, you'll need to rely on
max_iterations
to limit token costs, as
max_budget_per_task
is not supported in the resolver flow.
t
@nutritious-balloon-65098 how can i track teh spend of tokes for each iteration
@important-yak-87889 can you please help me with this.
Also i wanted to know whether the iterations is useful or not. As, if its not able to fix in first iteration then how can it be able to fix in second iteration or more.