The planner's single-shot Claude call intermittently failed with "Reached maximum number of turns (1)" — it needs slightly more headroom than the clarifier to finish emitting its JSON. Phase A of the planner-reliability plan: - plan_node now invokes with max_turns=4 (allowed_tools stays []; the extra turns buy completion, not exploration). - build_plan_prompt instructs the model to use no tools and return only JSON (a tool_use would consume the single turn before the plan is emitted). - plan_node auto-retries the model call exactly once on a TRANSIENT failure (turn-cap exhaustion or an empty reply), and fails fast on DETERMINISTIC ones (malformed JSON, missing/blank phases) — a retry would just reproduce those. review_loop_llm.py is intentionally GPT-4.1 cross-family (no claude_invoke), so it gets no turn-budget change. verifier_llm.py does use claude_invoke but is P3 build/verify scope — left for a follow-up. Tests: max_turns passthrough; retry on turn-cap and on empty; no retry on malformed JSON; the no-tools prompt line. 1387 passed. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| build_verify_subgraph.py | ||
| builders.py | ||
| builders_llm.py | ||
| clarifier.py | ||
| clarifier_llm.py | ||
| dispatch_invoker.py | ||
| fixer.py | ||
| handbook.py | ||
| planner.py | ||
| review_loop.py | ||
| review_loop_llm.py | ||
| verifier.py | ||
| verifier_llm.py | ||