Repository navigation
fix(lead): Declare the Lead's main tools as direct - #4012
Conversation
The Lead's only list has 14 tools, and 8 of them were deferred, so the Lead had to call searchTools to find its own core tools such as searchConversations. Deferring keeps a long tool list short; an only list is already short. A Turn with an only list now lists each of its tools. The registry applies the rule, so cache warming sends the same tool list. Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dcramer
left a comment
There was a problem hiding this comment.
This doesn't feel like the right way to build this abstraction. It is hardcoding too much behavior in the wrong places
|
Fair. The rule is implicit ("an What I'd do instead: the Lead declares its primary tools next to The other option is to make these conversation tools direct for every Turn and drop the per-kind override. Which do you want, or did you have a different shape in mind? |
|
470 screenshot changes — 0 changed · 470 added · 0 removed |
Replace the implicit only-list rule with a direct list that the Lead declares next to only in kind-behavior.ts. tool-exposure.ts owns the rule: a deferred tool named in direct is listed in the model tool list, and other exposures do not change. Co-Authored-By: David Cramer <[email protected]>
|
I'm still a little concerned about this. Like, we don't need Guardian blocking these kinds of things. What we need is the Guardian to not allow unsafe operations in general, if that makes sense, which might need some prompt changes, some other structural changes, but we've had a handful of concerns with Guardian. And these kinds of things with it over asking are already a concern. So, if the simple solution for now is just to allow a prove on this, that's probably fine. I think the thing though is we wouldn't want like we don't need the sub agent to treat messages, instructions from the user as unsafe here, but we do need the lead agent, for example, the guardian to run there to make sure like, oh yeah, the request for this tool call is clearly what the user intended and that the agent isn't just spawning off a bunch of random conversations that the user didn't ask for |
|
Agreed. To be clear, this PR doesn't change Guardian. It only changes which tools the Lead sees without The direction you describe fits the Guardian tracking issue, #3947:
|
A Lead Turn called
searchConversationsdirectly and got Pi'sTool searchConversations not found. The tool is deferred, so it is only reachable throughsearchTools/executeTool.The Lead's tool config in
kind-behavior.tsnow declares its main tools in adirectlist next toonly:searchConversations,searchConversationEvents,readConversationEvent,searchInboxItems,searchEventTypes,listWatches, andstopWatchingResources.listedToolExposureintool-exposure.tsowns the rule: a deferred tool named indirectis in the model tool list. Other exposures do not change, sodirectcannot reveal a Code Mode-only or hidden tool. Other kinds declare nodirectlist and do not change.createToolsandstaticToolDefinitionsboth apply it, so cache warming sends the same tool list as a live Turn. The Lead's prompt prefix changes once with this deploy and is stable after it.Other Turns still get Pi's bare error for a direct call to a deferred or unknown tool. A separate change replaces that error with a hint.
via @dcramer.
--
View Session [Sentry]