Skip to content

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

Closed as not planned

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.

Activity

  1. added
    bug
    on Aug 9, 2025
  2. added
    has repro
    platform:windows
    on Aug 9, 2025
  3. changed the title [-][BUG][/-] [+][BUG] Task subagents fail to inherit permissions in MCP server mode (affects both WSL and native Windows)[/+] on Aug 9, 2025
  4. github-actions commented on Aug 9, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. Multi-agent flows don't inherit permission approvals, causing repetitive prompts #2823
    2. [BUG] MCP resources not available for subagents #2169
    3. [BUG] [1.0.64-] authentification to subagents are no longer propagated #4855

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  5. jrassi06 commented on Aug 9, 2025

    @jrassi06
    Author

    it does not look like the same issue reported before....maybe a little related but its unique enough scenario a I think.

  6. TaylorFacen commented on Aug 25, 2025

    @TaylorFacen

    I thought I was running into this same issue as well. Turns out, I just needed to wait for the MCP to connect before prompting the sub-agent.

  7. github-actions commented on Dec 4, 2025

    @github-actions

    This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

  8. added
    autoclose
    on Dec 4, 2025
  9. github-actions commented on Jan 4, 2026

    @github-actions

    This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

  10. github-actions commented on Jan 11, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  11. locked as resolved and limited conversation to collaborators on Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corearea:mcparea:toolsautoclosebughas reproplatform:windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions