Skip to content

Commit b75e470

Browse files
geledekclaude
andcommitted
scripts: golden-prompt runner — tolerate error_max_turns in capped routing runs
The 3-turn cap is the routing mode's cost control; hitting it is expected once a skill starts executing roles, and activation is already visible in the transcript. Only genuine run failures (rate limit, API error) are now reported as errors. With this fix the full routing table passes 9/9 live. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent ce8817d commit b75e470

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/run_golden_prompts.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,11 @@ def run_claude(prompt: str, model: str | None, max_turns: int | None, timeout: i
104104
activated.add(block.get("input", {}).get("skill", "").split(":")[-1])
105105
elif event.get("type") == "result":
106106
result_text = event.get("result") or ""
107-
if event.get("is_error") or event.get("subtype") != "success":
108-
# A failed run must not masquerade as "skill stayed dormant".
107+
# error_max_turns is expected in capped routing runs — activation is
108+
# already visible in the transcript. Any other failure must not
109+
# masquerade as "skill stayed dormant".
110+
if (event.get("is_error") or event.get("subtype") != "success") \
111+
and event.get("subtype") != "error_max_turns":
109112
result_error = f"{event.get('subtype')}: {result_text[:200]}"
110113
return activated, result_text, result_error
111114

0 commit comments

Comments
 (0)