create_goal_criteria_fallback_agent(
*,
model: str | BaseChatModel,
model_retries: int = DEFAULT_MODEL_RETRIESCreate the goal-only fallback agent for criteria generation.
This agent has no context tools, repository access, or HITL: it drafts
acceptance criteria from the goal message alone. GoalCriteriaMiddleware
invokes it when the context-enabled agent fails at the graph level (e.g.
exhausts its recursion budget) or returns no usable proposal, restoring the
guarantee that /goal always yields criteria unless the model itself is
unavailable.
Explicit --max-retries value for runtime model switches.
Workspace environment retained for runtime model switches.