[BUG] Agent Teams: teammate permission requests reach lead's inbox but lead has no SendMessage response variant to approve them
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet. The prior closed issues (#30323, #34653, #36007) covered the case where requests never reached the lead. This is a different, post-fix gap: requests now do reach the lead's inbox, but the lead has no
SendMessageresponse variant to approve them. - [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When a teammate in an Agent Teams run requests a tool permission (e.g. Write), the teammate's UI shows:
╭──────────────────────────────────────────────────────────────────────╮
│ · Waiting for team lead approval │
│ ⏺ @skill-hardener-v3 │
│ Tool: Write │
│ Action: Write a file to the local filesystem. │
│ Permission request sent to team "super-team-self-improve" leader │
╰──────────────────────────────────────────────────────────────────────╯
The request is written to the lead's inbox as a JSON payload (~/.claude/teams/{team}/inboxes/team-lead.json) with {"type": "permission_request", "request_id": "perm-…", "tool_name": "Write", "tool_use_id": "…", "input": {…}}.
But the lead's SendMessage tool schema only accepts three object response variants: shutdown_response, shutdown_request, and plan_approval_response. There is no permission_response variant. Attempting to send one fails validation:
InputValidationError: No matching discriminator on "type"
Plain-text messages ("Approved. Proceed.") are delivered successfully but have no effect on the blocked permission prompt. The teammate remains stuck until it times out or is shut down.
What Should Happen?
SendMessage should accept a permission_response variant matching the existing request/response pattern:
{
"to": "skill-hardener-v3",
"message": {
"type": "permission_response",
"request_id": "perm-1776497251823-jh66pfj",
"approve": true,
"reason": "approved by lead"
}
}
Sending this should unblock the teammate's permission prompt and let the tool call proceed (or deny it, freeing the teammate to report a blocked action).
Alternatively: the lead's CLI should surface teammate permission requests as an interactive approval prompt (same UX as first-party tool permissions). Today, the lead sees no prompt at all — only a silent inbox log entry.
Error Messages/Logs
SendMessage attempt with permission_response:
{
"code": "invalid_union",
"errors": [
[{"expected": "string", "code": "invalid_type", "path": [], "message": "Invalid input: expected string, received object"}],
[{"code": "invalid_union", "errors": [], "note": "No matching discriminator", "path": ["type"], "message": "Invalid input"}]
],
"path": ["message"],
"message": "Invalid input"
}
Inbox entry received by lead (confirms request routed successfully to inbox):
{
"from": "skill-hardener-v3",
"text": "{\"type\":\"permission_request\",\"request_id\":\"perm-1776497251823-jh66pfj\",\"agent_id\":\"skill-hardener-v3\",\"tool_name\":\"Write\",\"tool_use_id\":\"toolu_…\",\"description\":\"Write a file to the local filesystem.\",\"input\":{\"file_path\":\"…/SKILL.md\",\"content\":\"…\"}}"
}
Steps to Reproduce
- Start a Claude Code session with
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. TeamCreate({ team_name: "repro-team" }).- Spawn a teammate that will need
Writepermission:
````
Agent({
subagent_type: "general-purpose",
team_name: "repro-team",
name: "writer",
model: "opus",
prompt: "Use opus with xhigh effort. Write the string 'hello' to /tmp/repro.txt using the Write tool."
})
- Teammate invokes
Write. Its UI shows "Waiting for team lead approval" with request_id logged to lead inbox. - As the lead, try to approve via
SendMessage:
```
SendMessage({
to: "writer",
message: { "type": "permission_response", "request_id": "<id from inbox>", "approve": true }
})
No matching discriminator on "type"`.
→ Fails with
- Try plain-text approval:
````
SendMessage({ to: "writer", message: "Approved. Proceed." })
→ Delivered, but teammate remains stuck at the permission prompt.
- No interactive CLI prompt appears in the lead's terminal either.
Teammate blocks until shutdown.
Claude Model
Opus
Is this a regression?
I don't know
Claude Code Version
2.1.114 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
Related (closed) issues:
- #30323 Team agent tool calls blocked: permission approval requests never reach team lead
- #34653 MCP tool approval requests from Agent Teams teammates do not route to team lead
- #36007 Agent Teams: MCP tool permission requests not surfaced to team lead (tmux mode)
- #49865, #49812, #50006, #49303 Prior crashes in the permission-forwarding code path
Related open:
- #49920 Agent Team teammates don't inherit permissions.allow from global settings.json — partial workaround (pre-authorize tools) but does not address interactive approval.
Expected fix path: add permission_response (and its mirror permission_request if the lead needs to originate, which it doesn't) to the SendMessage discriminated union in the tool schema; wire the inbox-delivered request into a CLI prompt for the lead as a fallback path.
Workaround today: grant blanket Write permission via the lead's permission mode at session start (e.g. acceptEdits or bypassPermissions), trading safety for unblocking.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗