From ebc6126513bf795a58cc03b178d0d6db5c069c31 Mon Sep 17 00:00:00 2001 From: Dagim Woldemareyam <138494817+MriBoyd@users.noreply.github.com> Date: Wed, 14 Oct 2026 11:30:24 +0300 Subject: [PATCH] Update strix/agents/planner.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- strix/agents/planner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/strix/agents/planner.py b/strix/agents/planner.py index ff0d5833..1a723923 100644 --- a/strix/agents/planner.py +++ b/strix/agents/planner.py @@ -191,7 +191,9 @@ class ScanPlanner: ) # 6. Apply max_steps limit if specified - if max_steps is not None and max_steps > 0: + if max_steps is not None: + if max_steps < 0: + raise ValueError("max_steps must be non-negative") steps = steps[:max_steps] # Renumber sequentially for idx, step in enumerate(steps, start=1):