Skip to content

[BUG] Task subagents fail to inherit permissions in MCP server mode (affects both WSL and native Windows) #5465

@jrassi06

Description

@jrassi06

[BUG] Task subagents fail to inherit permissions in MCP server mode (affects both WSL and native Windows)

Environment

  • Claude Code Version: 1.0.72
  • Platform: Windows 11 (Native installation, not WSL)
  • Installation method: Official Windows installer (irm https://claude.ai/install.ps1 | iex)
  • Running as: MCP server for Claude Desktop
  • Claude Desktop Version: 0.12.55

Bug Description

When using the Task tool to spawn subagents in MCP server mode, the subagents fail to inherit file system permissions from the parent process. This results in permission prompts that cannot be answered through the MCP interface, making the Task feature unusable.

Steps to Reproduce

  1. Install Claude Code native Windows version:
irm https://claude.ai/install.ps1 | iex
  1. Configure Claude Desktop with MCP server:
{
  "mcpServers": {
    "claudecode": {
      "command": "C:\\Users\\username\\.local\\bin\\claude.exe",
      "args": ["mcp", "serve"],
      "env": {}
    }
  }
}
  1. Through Claude Desktop, request a task that requires subagent file access:
"Use the Task tool to search for all Python files in my Documents folder"
  1. Observe error: Subagent requests file system permissions that cannot be granted through MCP interface

Expected Behavior

Subagents should inherit the permissions of the parent Claude Code process, similar to how other tools (Read, Write, Bash) work without additional permission prompts.

Actual Behavior

Subagents spawn without inherited permissions and request permissions that cannot be granted through the MCP protocol, making the Task feature unusable.

Error Messages

I need permission to access the file system. Could you please grant me permission to read from the directory

Additional Context

This affects multiple environments:

  • ✅ Confirmed on native Windows installation
  • ✅ Confirmed on WSL with MCP server mode
  • ✅ Confirmed with various permission flags (--permission-mode bypassPermissions doesn't propagate to subagents)

Attempted Workarounds (all failed):

  1. Using --permission-mode bypassPermissions flag - doesn't propagate to subagents
  2. Setting permissions in environment variables - not inherited
  3. Running with elevated privileges - no effect
  4. Using different shells (PowerShell, CMD, Git Bash) - same issue

Related Issues:

Impact

This bug makes the Task feature completely unusable in MCP server mode, which is a critical limitation for Windows users who want to use Claude Code with Claude Desktop. The Task tool is advertised as a core feature for handling complex, multi-step operations, but cannot be used at all due to this permission issue.

Proposed Solution

Subagents should automatically inherit the permission context of their parent process, or there should be a way to pre-authorize subagents through configuration (similar to how the main process can be configured with permission flags).

Workaround

Currently, the only workaround is to avoid using the Task tool entirely and manually perform operations using individual tools (Read, Write, Bash, etc.), which significantly limits the capability of Claude Code.

System Information

OS: Windows 11 Pro 23H2
Node.js: v20.11.0
npm: 10.2.4
Git: 2.43.0.windows.1
Claude Code: 1.0.72 (native Windows)
MCP Protocol Version: 2025-06-18

Reproduction Repository

Happy to provide access to a minimal reproduction setup if needed.


Note for maintainers: This issue affects both WSL and native Windows installations, suggesting it's a fundamental architectural issue with how subagents are spawned rather than a platform-specific problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions