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
- Launch Claude Code with
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 CLAUDE_CODE_USE_FOUNDRY=1from a working directory (mine:/Users/mikhail.grinberg/Bonial-discovery). - Spawn a teammate via the
Agenttool withteam_name,name,subagent_type: "general-purpose", and the defaultmode(i.e. notbypassPermissions). - From inside the teammate, call a tool (e.g.
Grep) whosepathargument points outside the parent's CWD. In my case:/Users/mikhail.grinberg/offer-feed-matching-api/content_quality. - The teammate emits a
permission_requestback to the lead via the team protocol. - 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- checkspermissionExplainerEnabledTl7({toolName, toolInput, toolDescription, messages, signal})- aroundcli.js:8231
Workarounds
Any of the following avoid the crash:
- Spawn teammates with
mode: "bypassPermissions". - Pre-allow all needed paths via
.claude/settings.local.jsonbefore spawning the teammate, so no permission_request is generated. - Keep teammate tool calls strictly inside the parent's CWD.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗