You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(#353): cost_exceeded_action:fail — make per-node cost caps safe
A per-node max_cost_usd breach always routed OutcomeRetry, which re-runs (and
multiplies the cost of) an expensive, uncached node — so capping the runaway
review lane from the case study would burn up to 3× the cap before giving up,
often worse than uncapped. That retry-multiplier is why capping the reviewers
couldn't be done safely.
New `cost_exceeded_action: fail` node attr routes the node's fail edges
immediately on a cost breach (no retry), so a cap is safe to place on a lane that
should escalate rather than re-run. In build_product the reviewers' fail path
already routes to EscalateReview (a human gate), so a capped-then-failed reviewer
escalates cleanly. Default stays "retry" (unchanged behavior).
This ships the enabling primitive; the cap *value* on build_product's reviewers
needs real-run cost data to calibrate (too low → false escalations), so that .dip
edit is deliberately left for a run rather than guessed blind. Combined with the
already-shipped `tracker diagnose` cost-asymmetry detector, #353 now has both the
"make it visible" and the "make a cap safe" halves.
Tests: cost_exceeded_action=fail routes OutcomeFail (not Retry) while still
setting node_cost_exceeded for fail-edge conditions.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GVTTPqhd6w2tzmgwEqJpL3
0 commit comments