Agent crash: classifyHandoffIfNeeded is not defined
Resolved 💬 3 comments Opened Feb 9, 2026 by jamie8johnson Closed Feb 12, 2026
Description
When spawning a Plan-type subagent via the Task tool, the agent crashes immediately with a JavaScript runtime error:
classifyHandoffIfNeeded is not defined
The agent never executes any tools or produces output. Status shows as failed.
Reproduction
- Use the Task tool to spawn a
Plansubagent - Agent fails immediately with the error above
Context
- Occurred during a multi-step implementation task (renaming a directory across ~40 source files)
- The Task tool call itself succeeded (returned an agent ID), but the spawned agent failed on startup
- Workaround: wrote the plan manually instead of using the Plan agent
- Other agent types (general-purpose with
subagent_type: "general-purpose") worked fine in the same session
Environment
- Platform: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
- Model: claude-opus-4-6
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗