fix: allow read-only subagents (explore, plan, recall) in plan mode (#481)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-06 17:34:36 -08:00
committed by GitHub
parent 13318b0867
commit 2533df1df9

View File

@@ -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",