Repository navigation
fix(agent): fold gpt tool names for workers - #1452
Merged
Merged
Conversation
Spawn preflight treated apply_patch as an unknown engine, so a gpt worker could not require the wire name its allowlist already covers with write, edit, and delete. Worker advertise lists now use the same family projection as the parent.
Contributor
|
Triage: Fail @TheGreatAxios, please address the following:
|
requires_tools and worker advertisement resolve wire names through the profile projection, so a later family uses the same path as gpt. apply_patch, shell, and update_plan are rows in that table.
requires_tools accepts a wire name only when that profile projects it onto an allowlisted engine. shell and update_plan stay gpt-only; default keeps bash for run_shell.
The worker prefix lists shell, but the call gate only matched the default bash wire, so a shell call promoted run_shell. An exclude of manage_tasks now denies both update_plan and the engine id; shell and run_shell follow the same rule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
requires_toolspreflight resolve wire names from the profile projection table (ENGINE_TO_WIRE_BY_PROFILEplus that profile's fold). A later family uses the same path; director packages stay shared.apply_patch,shell, andupdate_planare gpt rows in that table, not a special case. A name the profile does not advertise staysunknown_tool.apply_patch. A gpt worker whose allowlist has no file-mutation engine still rejectsapply_patch.DOCS_TOOLSandBUILD_TOOLSstay engine ids and do not listapply_patch.Why: the parent session already folded family wire names, but worker preflight only knew catalog engine ids.
Verification
bun run typecheckandbun run buildpass (pre-commit)bun test src/subagent/capability-preflight.test.ts src/agent/tool-search.test.ts src/agent/tool-aliases.test.ts src/agent/prompt-sizes.test.ts src/agent/directors/tool-sets.test.ts src/agent/codex-tool-mount.test.ts— 166 pass, 0 failBUILD_TOOLS:apply_patchcanonicalizes towrite_file,edit_file,delete_file;shelltorun_shell;update_plantomanage_tasksapply_patchisunknown_toolREAD_TOOLS+apply_patchismissing_toolbun run checkon the previous commit failed one pre-existing scan-coverage floor (1366 scanned files, floor 1240). This commit adds no files.