Summary
Remote autoApproveSafeTools promises to auto-approve safe tools such as file reads and browser operations, but the remote validator compares a display/tool name against a case-sensitive safelist that uses different names. As a result, minimal safe-tool inputs such as read and navigate_page are not auto-approved, while Task is auto-approved even though the UI copy does not describe delegation/subagent tools as safe.
Minimal Reproduction
- Enable remote control with
autoApproveSafeTools=true.
- Send these tool names through the same remote auto-approve check used by
remote-manager.ts:
Current result:
read does not match the safelist entry Read.
navigate_page does not match the safelist entry mcp__Chrome__navigate_page.
Task matches the safelist and is auto-approved.
Evidence
src/renderer/components/remote/AdvancedConfigStep.tsx:63-83 renders the autoApproveSafeTools toggle.
src/renderer/i18n/locales/en.json:840-841 describes the feature as auto-approving safe tools such as file reads and browser operations.
src/main/remote/remote-manager.ts:618-655 performs auto-approval with safeTools.includes(toolName).
src/main/remote/remote-manager.ts:621-648 includes Read, Chrome MCP canonical-looking names such as mcp__Chrome__navigate_page, and Task in the safelist.
src/main/claude/agent-runner.ts:979-982 passes displayName to requestPermission(...), not the canonical toolName.
src/main/claude/agent-runner.ts:1021-1042 can serialize MCP tools to names such as navigate_page.
src/main/config/permission-rules-store.ts:18-28 and src/renderer/store/index.ts:207-214 use lowercase local default tool names such as read, glob, grep, and ls.
Actual Behavior
The remote auto-approve path is name-sensitive and receives names that do not match the safelist. Safe file/browser operations are not reliably auto-approved. Task is auto-approved although the user-facing description does not include delegation/subagent capability in the safe-tool boundary.
Expected Behavior
Remote auto-approval should use one canonical tool-name contract. User-visible display names can be used in UI messages, but authorization should not depend on display names or case variants.
The Task entry should either be removed from the default safe list or explicitly documented in the UI as an auto-approved capability.
Existing Issue / PR Coverage
Checked open and closed issues/PRs with:
autoApproveSafeTools safeTools remote permission Task
requestPermission displayName remote safe tools
No direct coverage was found.
Related but not covering this bug:
Proposed Fix
- Carry both canonical tool name and display name in permission request payloads.
- Base remote auto-approval on canonical names only.
- Keep display names only for user-facing feedback.
- Add a normalization helper for MCP names, casing,
originalName, and display names.
- Re-evaluate whether
Task should be in the default safe list.
Suggested Tests
- With
autoApproveSafeTools=true, read, glob, grep, and ls are auto-approved through canonical matching.
- Chrome MCP browser tools are auto-approved regardless of display-name serialization.
Task behavior is explicitly tested: either not auto-approved, or documented and intentionally auto-approved.
Summary
Remote
autoApproveSafeToolspromises to auto-approve safe tools such as file reads and browser operations, but the remote validator compares a display/tool name against a case-sensitive safelist that uses different names. As a result, minimal safe-tool inputs such asreadandnavigate_pageare not auto-approved, whileTaskis auto-approved even though the UI copy does not describe delegation/subagent tools as safe.Minimal Reproduction
autoApproveSafeTools=true.remote-manager.ts:readnavigate_pageTaskCurrent result:
readdoes not match the safelist entryRead.navigate_pagedoes not match the safelist entrymcp__Chrome__navigate_page.Taskmatches the safelist and is auto-approved.Evidence
src/renderer/components/remote/AdvancedConfigStep.tsx:63-83renders theautoApproveSafeToolstoggle.src/renderer/i18n/locales/en.json:840-841describes the feature as auto-approving safe tools such as file reads and browser operations.src/main/remote/remote-manager.ts:618-655performs auto-approval withsafeTools.includes(toolName).src/main/remote/remote-manager.ts:621-648includesRead, Chrome MCP canonical-looking names such asmcp__Chrome__navigate_page, andTaskin the safelist.src/main/claude/agent-runner.ts:979-982passesdisplayNametorequestPermission(...), not the canonicaltoolName.src/main/claude/agent-runner.ts:1021-1042can serialize MCP tools to names such asnavigate_page.src/main/config/permission-rules-store.ts:18-28andsrc/renderer/store/index.ts:207-214use lowercase local default tool names such asread,glob,grep, andls.Actual Behavior
The remote auto-approve path is name-sensitive and receives names that do not match the safelist. Safe file/browser operations are not reliably auto-approved.
Taskis auto-approved although the user-facing description does not include delegation/subagent capability in the safe-tool boundary.Expected Behavior
Remote auto-approval should use one canonical tool-name contract. User-visible display names can be used in UI messages, but authorization should not depend on display names or case variants.
The
Taskentry should either be removed from the default safe list or explicitly documented in the UI as an auto-approved capability.Existing Issue / PR Coverage
Checked open and closed issues/PRs with:
autoApproveSafeTools safeTools remote permission TaskrequestPermission displayName remote safe toolsNo direct coverage was found.
Related but not covering this bug:
PermissionDialogandsettings.permissionRulesare not wired to the pi-coding-agent tool path #164 covers local chat tools executing without approval. It does not cover remote safe-tool name drift.remote-manager.tssafelist matching or theTasksafe-tool boundary.Proposed Fix
originalName, and display names.Taskshould be in the default safe list.Suggested Tests
autoApproveSafeTools=true,read,glob,grep, andlsare auto-approved through canonical matching.Taskbehavior is explicitly tested: either not auto-approved, or documented and intentionally auto-approved.