Repository navigation
fix(core): refresh tool catalog within the current turn - #4526
Conversation
🦋 Changeset detectedLatest commit: 4a11ce9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
…pe gap MoonshotAI#4526 is already in the tree: the loadable-tools announcement refreshes on every turn and only awaits the MCP initial load when the turn is new. MoonshotAI#4600 does not port as written. This fork binds a session to `{ workspaceId, runtimeId }` rather than upstream's `{ environmentId, cwd }`, and `IEnvironmentService` is not exported from the agent-core-v2 root, so the legacy `acp:<id>` rebind needs a field mapping plus a public export. Recorded rather than forced, so the next attempt starts from the shape difference instead of rediscovering it. Ledger: closed 34 -> 35, remaining 64.
…probe MoonshotAI#4554 lands in 8caec0b with a probe over the new message case. MoonshotAI#4526's probe carried unescaped parentheses, so `rg` read them as groups and the pattern could never match; it now escapes them. The full `--verify` run is green again (33 probes). Ledger: closed 39 -> 40, remaining 59.
Requirement or Bug
MCP 授权成功后,同一轮的模型仍看不到新工具目录,无法可靠地选择并继续调用真实工具。
Bug Reproduction Steps
Root Cause
目录提醒虽然在每个步骤准备时运行,但 provider 在非新轮次直接返回,遗漏了轮内发生的 MCP 工具变化。本修复调整通知时机,复用已有目录差异计算、权限过滤和去重。
Code Changes
新增同轮 HTTP MCP 授权回归,并更新目录通知测试;附带 CLI patch changeset。
Behavior Changes and Affected Users
受影响模块为 agent-core-v2 的工具目录提醒,不修改 schema 加载方式、历史工具 schema 保留规则、公开 API 或持久化格式。
验证:
Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.未关联 issue。本修复不改变用户配置或操作方式,无需新增用户文档;发布说明已包含在 changeset 中。