Refactor Agents#413
Conversation
4ac8139 to
362ed02
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ac8139764
ℹ️ 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".
362ed02 to
a56c22e
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a56c22e894
ℹ️ 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".
a56c22e to
9366a1a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9366a1a. Configure here.

Note
Medium Risk
Large refactor of core agent execution, tool-call plumbing, and gateway model resolution; regressions could break tool execution, citations, or provider-specific message formatting. Mostly internal API reshaping, but touches critical runtime paths for Claude/Gemini agents.
Overview
Refactors the core agent architecture by replacing the old
EvalContext-boundMCPAgentwith a run-scopedAgentContext+ generic provider message typing, and moving tool execution/formatting into sharedAgentToolsabstractions used by Claude and Gemini.Updates Claude and Gemini agents to the new loop: provider-specific
format_messages(), unifiedAgentResponsereturn type, centralized tool preparation/execution, and revised citations handling (including tool-result citation documents for Claude and grounding citations for Gemini).Moves/modernizes gateway routing:
create_agent()now lives inhud/agents/gateway.pyand can resolve models via HUD/models/metadata, selecting the right agent type/provider client automatically. Documentation is updated to reflect terminology changes ("ResponseAgent" → response automation,InferenceResult→AgentResponse) and changelog wording.Reviewed by Cursor Bugbot for commit 9366a1a. Bugbot is set up for automated code reviews on this repo. Configure here.