Repository navigation
Conversation
🦋 Changeset detectedLatest commit: f400e7d 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c305d4436b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const target: ToolAvailabilityTarget = { | ||
| isSubagentPreview: true, | ||
| environment: this.environment, | ||
| }; |
There was a problem hiding this comment.
Avoid filtering subagent tools by the caller environment
When the experimental environment argument sends a subagent to a different environment, this preview evaluates capability-gated tools against the caller's binding instead. SessionSubagentService.spawn resolves that argument into a separate child binding before activation, so a caller in a process-only environment will have Read/Edit omitted from the Agent description even when the selected target has fs (and a filesystem-capable caller can advertise them for a process-only target). Do not use the caller environment to prune descriptions when the eventual subagent environment is selectable.
Useful? React with 👍 / 👎.
| return this.knownToolReferences().filter( | ||
| (ref) => !contributionNames.has(ref.name) || available.has(ref.name), | ||
| ); |
There was a problem hiding this comment.
Preserve user-tool overrides in subagent descriptions
When a user registers a tool named WebSearch while no web-search provider is configured, the registry keeps that user tool and SessionSubagentService inherits it into the child. This filter nevertheless sees the built-in WebSearch contribution, marks it unavailable, and removes the name even though the live registry entry is the user tool. Consequently profiles that allow WebSearch are described as lacking a tool the subagent will actually receive. Base the availability filter on the live entry/source, not merely on a same-named contribution.
Useful? React with 👍 / 👎.
c305d44 to
fca3586
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! 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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f3e555807
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| capabilities.dynamically_loaded_tools === true && capabilities.tool_use, | ||
| ) | ||
| ) { | ||
| refs.delete(SELECT_TOOLS_TOOL_NAME); |
There was a problem hiding this comment.
Preserve user overrides of select_tools
When an SDK caller registers a user tool named select_tools and the experimental flag is disabled (the default) or no selectable subagent model supports dynamic tools, this branch removes that live user-tool reference. The preceding loop deliberately preserves user sources, and SessionSubagentService inherits user tools into child agents, so profiles that allow it receive a functioning tool despite the Agent description withholding it. Restrict this deletion to the builtin contribution, as is already done for ReadMediaFile.
AGENTS.md reference: AGENTS.md:L100-L100
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5722cc3e5
ℹ️ 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".
| const code = text.codePointAt(i); | ||
| if (code >= 0xdc00 && code <= 0xdfff && i > 0) { | ||
| const high = text.charCodeAt(i - 1); | ||
| const high = text.codePointAt(i - 1); |
There was a problem hiding this comment.
Preserve surrogate pairs while truncating from the end
When compaction truncates a user message whose retained suffix begins at an astral character such as an emoji, codePointAt(i - 1) returns the complete code point rather than the high-surrogate code unit, so this range check fails to decrement i. The character is then counted twice and, at the token boundary, the retained text can begin with an isolated low surrogate (for example, truncating "x😀" to one estimated token returns "\uDE00"), corrupting the compacted prompt; these UTF-16 checks need to remain code-unit based.
AGENTS.md reference: AGENTS.md:L98-L100
Useful? React with 👍 / 👎.
commit: |
Requirement or Bug
子 agent 的工具描述可能列出实际无法启用的工具,例如未配置搜索服务时仍宣称可以使用 WebSearch。
Bug Reproduction Steps
Agent工具描述中的 explore 工具名单,其中仍包含 WebSearch。关闭 WaitFor 或缺少工具所需的运行环境能力时,也会出现相同问题。
Root Cause
工具初次激活会检查贡献的
when条件和运行环境能力,但描述生成只枚举静态贡献。两处现在复用同一套可用性判断,描述继续按目标子 agent 的 profile 叠加全局、session 和 workspace 工具策略。媒体工具和动态工具需要按子模型判断。候选列表统一处理可选或强制子模型的能力,避免依赖父模型的注册结果;显式工具名单和未声明
tools的 profile 共用这一候选列表。实际注册的用户同名工具优先于内置贡献。Code Changes
工具生命周期保持原有语义:普通激活跳过已注册工具;runtime 变化只撤销不再满足 runtime 要求的工具。
when失效会从描述中移除内置贡献,但不会因此注销已注册工具。WebSearch 在执行时仍能返回搜索配置已移除的明确错误。子 agent 继续继承调用方的 runtime 和用户工具;模型选择策略与 MCP 通配符规则不变。
Behavior Changes and Affected Users
Tools: all或all except ...select_toolstools的自定义 agent 用户测试覆盖搜索 provider 缺失与恢复、WaitFor / NotifyUser 条件、runtime 要求、用户覆盖、profile 限制及父子模型能力组合。新增 runtime 事件回归测试验证:
when失效后,runtime 变化仍保留满足 runtime 要求的已注册工具,也保留没有 runtime 要求的工具;既有测试继续覆盖能力失效时的撤销及恢复。验证:
模型相关描述表达候选模型的可选能力;未强制模型时,不保证任意选中的模型都具备候选集合中的全部工具。本 PR 未新增跨模型 spawn 集成测试。
Checklist
gen-changesetsskill;沿用现有 CLI patch changeset,本次修订恢复原有生命周期,无需重复条目。gen-docsskill;使用方式和配置语义不变,相关内置联网指引已同步调整,无需新增用户文档。