Repository navigation
feat(tools): Add codemode exposure and give modelOnly its meaning - #2529
Merged
Merged
Conversation
modelOnly tools are now in the model tool list but not in the tool catalog or the script tool set. Add a codemode exposure for tools that only Code Mode scripts may call, and plan scriptTools for the Code Mode bridge. Mark handoff, finishAutomationRun, reportBlocked, searchTools, and executeTool as modelOnly. executeTool could run handoff before, which bypassed the agent loop's handoff handling. Refs #1987 Co-Authored-By: Thomas Jiang <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Both tools tie the agent invocation to the model's own tool call id, so only the model calls them directly. executeTool and Code Mode scripts cannot run them. Refs #1987 Co-Authored-By: Thomas Jiang <[email protected]>
thomasjiangcy
approved these changes
Nov 2, 2026
thomasjiangcy
approved these changes
Nov 2, 2026
This branch was successfully deployed
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.
Prep for Code Mode (#1987). This change sets who may call each tool. It does not add the bridge or the
codemodetool.searchTools/executeTool)directdeferredmodelOnlycodemode(new)hiddenplanToolExposurenow returnsscriptTools(direct + deferred + codemode) for the bridge.excludedToolshad no runtime reader, so this PR removes it.codemodetools are not in the catalog. This matches pi. The catalog is a model-facing path, so acodemodetool in it would let the model run it throughexecuteTool.handoff,finishAutomationRun,reportBlocked,spawnAgent,messageAgent,searchTools, andexecuteToolare nowmodelOnly. These tools control the agent loop, start or steer agent invocations, or dispatch other tools.spawnAgentandmessageAgenttie the agent invocation to the model's own tool call id. The model still sees these tools and calls them directly. Onmain,executeToolcould also runhandoff. A local CLI run showed that this switched the profile, but the loop's handoff handling did not run, and the model got "No result provided". NowexecuteToolrefuses it.callMcpToolandsearchMcpToolsstaydirect. Raw MCP tools (mcp.allowed-tools) have no exposure of their own and no registry entry.callMcpTooldoes its own dispatch and has its own action review metadata, so it is the only path that scripts have to those tools. Wrapped MCP tools are plugin JS tools, so they can already useexposure: "codemode".No repo or getsentry org code (including
junior-prod) setsmodelOnly. Pluginplugin.yamlhas no exposure field, and the public docs do not list exposure values.Open questions for the bridge track:
loadSkillalso bemodelOnly?callMcpTool?via @thomasjiangcy.
--
View Session [Sentry]