fix: an hx error asks the user instead of taking the state's first catch
hx reports its own failures (API, login, ...) as blocked with reason "error" and no catch. orch then fell back to the state's first catch, so with code's ToolDenied = "review" a failed agent looked like "review ready" with no code written. Now the error lands in Needs-you; a reply runs the step again with the reply as hint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
551e0efd7c
commit
db80d15ba2
2 files changed
+38
-8
No files matched your search
@@ -9,7 +9,7 @@ Behaviour per `hx/step`, chosen with FAKE_MODE (orch passes FAKE_* through the p
|
||||
slow works until hx/interrupt (records hx/message and hx/compact in messages.txt / compact.txt), then
|
||||
answers done; a retried step with context.hint finishes at once
|
||||
limit step_result blocked, no catch, reason "limit" (hx hit a limit from hx/step)
|
||||
error step_result blocked, no catch, reason "error"
|
||||
error step_result blocked, no catch, reason "error"; finishes when the retried step has a context.hint
|
||||
crash exits without a step_result
|
||||
FAKE_UNDERSCORE=1 sends every custom method as `_hx/...`.
|
||||
FAKE_USAGE="ctx_used,ctx_limit,cost" makes every step report that usage first.
|
||||
@@ -90,7 +90,7 @@ def step(params):
|
||||
if mode == "needs_input" and not params.get("context", {}).get("hint"):
|
||||
note("hx/step_result", {"status": "needs_input", "question": "Which provider?"})
|
||||
return
|
||||
if mode in ("limit", "error"): # blocked without a catch, only the reason differs
|
||||
if mode == "limit" or mode == "error" and not params.get("context", {}).get("hint"): # blocked without a catch, only the reason differs
|
||||
note("hx/step_result", {"status": "blocked", "reason": mode, "summary": f"hit the {mode}"})
|
||||
return
|
||||
blocked = mode == "blocked"
|
||||
|
||||
Reference in new issue
Block a user