Team-lead session crashes with `H.toolUseContext.getAppState is not a function` when teammate tool call triggers a permission prompt

Resolved 💬 4 comments Opened Apr 17, 2026 by Blizzke Closed Apr 18, 2026

Claude Code version: 2.1.112

Summary

Running an agent team (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1). A teammate issued a Bash tool call (a for loop writing README.md files across sibling package directories) that the permission system forwarded to the lead for approval. Instead of rendering the prompt, the lead session crashed with:

ERROR  H.toolUseContext.getAppState is not a function.
       (In 'H.toolUseContext.getAppState()', 'H.toolUseContext.getAppState' is undefined)

The lead session became fully hung and had to be killed. The teammate continued unaffected after the "dialog for permission" was Ctrl+C'ed (its own permission model proceeded on the tool call). The team config, task list, and teammate tmux pane all survived.

Expected

Permission prompt renders in the lead session; lead approves or denies; teammate proceeds accordingly.

Observed

Lead crashes with the JS error above; has to be restarted externally.

Repro shape

  • Start a lead session with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, create a team, spawn a teammate.
  • Have the teammate run a tool call that the permission system needs to forward to the lead for approval (e.g. a Bash command or a Write that isn't pre-allowlisted).
  • At the moment the lead would display the confirmation prompt, the crash occurs instead.

No project-specific details; happy to share more if helpful.

Edit: Damn! I created that one just a tad early. #50k would've been nice ;-)

View original on GitHub ↗

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