fix: allow read-only subagents (explore, plan, recall) in plan mode (#481)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -197,6 +197,23 @@ class PermissionModeManager {
|
||||
}
|
||||
}
|
||||
|
||||
// Allow Task tool with read-only subagent types
|
||||
// These subagents only have access to read-only tools (Glob, Grep, Read, LS, BashOutput)
|
||||
const readOnlySubagentTypes = new Set([
|
||||
"explore",
|
||||
"Explore",
|
||||
"plan",
|
||||
"Plan",
|
||||
"recall",
|
||||
"Recall",
|
||||
]);
|
||||
if (toolName === "Task" || toolName === "task") {
|
||||
const subagentType = toolArgs?.subagent_type as string | undefined;
|
||||
if (subagentType && readOnlySubagentTypes.has(subagentType)) {
|
||||
return "allow";
|
||||
}
|
||||
}
|
||||
|
||||
// Allow read-only shell commands (ls, git status, git log, etc.)
|
||||
const shellTools = [
|
||||
"Bash",
|
||||
|
||||
Reference in New Issue
Block a user