Agent teams: lead pane crashes rendering cross-agent permission_request for out-of-CWD path (2.1.112)

Resolved 💬 3 comments Opened Apr 17, 2026 by mikhailgrinberg Closed Apr 18, 2026

Summary

When a teammate (sub-agent spawned via the experimental agent teams feature) forwards a permission_request back to the parent (team-lead) session for a tool call whose path is outside the parent's CWD, the lead pane crashes with an unhandled TypeError while rendering the permission prompt. I had to Ctrl+C the lead pane to recover.

Environment

  • Claude Code version: 2.1.112 (/Users/mikhail.grinberg/.local/share/claude/versions/2.1.112)
  • Platform: macOS Darwin 25.3.0 (arm64), zsh
  • Model: bonial-claude-opus-4-7 (via foundry)
  • Env flags: CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, CLAUDE_CODE_USE_FOUNDRY=1

Repro

  1. Launch Claude Code with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 CLAUDE_CODE_USE_FOUNDRY=1 from a working directory (mine: /Users/mikhail.grinberg/Bonial-discovery).
  2. Spawn a teammate via the Agent tool with team_name, name, subagent_type: "general-purpose", and the default mode (i.e. not bypassPermissions).
  3. From inside the teammate, call a tool (e.g. Grep) whose path argument points outside the parent's CWD. In my case: /Users/mikhail.grinberg/offer-feed-matching-api/content_quality.
  4. The teammate emits a permission_request back to the lead via the team protocol.
  5. The lead pane crashes while rendering the permission request.

Permission request payload (from team inbox JSON)

{
  "type": "permission_request",
  "request_id": "perm-1776401968945-wqtwugb",
  "agent_id": "investigator",
  "tool_name": "Grep",
  "tool_use_id": "toolu_011tXzquYgfUph1foP5ubx6Q",
  "input": {
    "pattern": "(xlsx?|Excel|openpyxl)",
    "path": "/Users/mikhail.grinberg/offer-feed-matching-api/content_quality",
    "output_mode": "files_with_matches",
    "-i": true
  }
}

Expected

Lead should render the permission prompt so I can allow/deny, or - at minimum - decline the request gracefully without crashing.

Observed

Lead pane shows an uncaught TypeError with a minified stack trace and becomes unresponsive. Functions implicated in the stack (minified):

  • Uf8 - checks permissionExplainerEnabled
  • Tl7({toolName, toolInput, toolDescription, messages, signal}) - around cli.js:8231

Workarounds

Any of the following avoid the crash:

  • Spawn teammates with mode: "bypassPermissions".
  • Pre-allow all needed paths via .claude/settings.local.json before spawning the teammate, so no permission_request is generated.
  • Keep teammate tool calls strictly inside the parent's CWD.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗