Strengthen deterministic agent workflow routing#381
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_7770c897-b51a-4e91-8e43-2b412716448a) |
|
Warning Review limit reached
Next review available in: 33 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_d0cae15a-af1f-46d4-94de-48af1910e99e) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68f00d3ef3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if action is not None: | ||
| return self._response_for_deterministic_action( |
There was a problem hiding this comment.
Keep explicit multi-action requests on the planner path
When a configured planner receives an explicit multi-step request where the first step matches the regex parser, e.g. Create a task to update docs and invite Sarah to Outline, this early return bypasses _plan_with_model after parsing only one AgentToolAction. The deterministic parser can only return a single action, so the later requested workflow is silently dropped instead of being planned as the multi-action confirmation path covered by the structured planner.
Useful? React with 👍 / 👎.
| if action is not None: | ||
| return self._response_for_deterministic_action( |
There was a problem hiding this comment.
Clarify missing GitHub repos before executing searches
In deployments where GITHUB_DEFAULT_REPO is not configured, an explicit request like Search GitHub issues matching onboarding now hits this deterministic early return, so the read action executes immediately and fails from ToolRegistry._resolve_repository with “GitHub repository is required”. The structured planner path still has _planner_action_clarification to ask “Which GitHub repository should I search?”, but this bypass means configured-planner users get a failed execution instead of the intended clarification whenever they omit the repo.
Useful? React with 👍 / 👎.
Summary
Validation
uv run --locked pytest -q tests/unit/test_agent_gateway.py tests/unit/test_agent_evals.py tests/unit/test_agent_planner.pyuv run --locked python scripts/agent_eval.py --suite canonical --model primary --no-env-file --json./scripts/lint.sh./scripts/pyrefly.shNote
Medium Risk
Changes core request routing for provisioning and other regex-mapped workflows; wrong ordering could skip or mis-route high-impact account actions, though tests target the main regression.
Overview
Deterministic routing now wins when regex can map a message to a supported tool, so explicit flows like 508 account provisioning no longer go through the structured planner first (avoiding model proposals that could override a clear command).
AgentOrchestrator.plan()parses with_parse_actionand returns via new_response_for_deterministic_actionbefore calling_plan_with_model. Ambiguous messages still use the live model planner; intent normalization and clarification paths are unchanged for unparsed input.Structured planner exceptions now emit a warning log (
model_tier,error_type) before falling back, without exposing provider details to users.Unit tests cover planner bypass for known workflows, observable planner failures, and structured planning for genuinely ambiguous onboarding-style requests.
Reviewed by Cursor Bugbot for commit 2ee1eff. Bugbot is set up for automated code reviews on this repo. Configure here.