CLI crashes when Skill tool is invoked with non-existent skill name
Description
Claude Code CLI crashes ungracefully when the Skill tool is invoked with a skill name that doesn't exist. The terminal becomes unresponsive (empty but still running, no keyboard input accepted), requiring the user to kill the process manually.
Steps to Reproduce
- Have an agent configuration where
prompt-engineerexists as an agent (in~/.claude/agents/prompt-engineer.md) but NOT as a skill - Have a subagent attempt to invoke:
Skilltool with{"skill": "prompt-engineer", "args": "..."} - Claude Code crashes - the interface completely disappears, terminal becomes empty
Expected Behavior
The Skill tool should return an error message like:
Error: Skill "prompt-engineer" not found. Available skills: aws-auth, cache-awareness, git, pr-review, ...
Actual Behavior
- The CLI crashes silently
- Terminal becomes unresponsive (empty screen, no input accepted)
- Process appears to still be running but cannot be interacted with
- Requires manual kill (Ctrl+C or kill command)
Environment
- Claude Code version: 2.1.12
- OS: macOS (Darwin 24.5.0, Apple Silicon)
- Installation: Homebrew
Session Log Evidence
The crash occurs consistently at this point in the session log:
{
"type": "tool_use",
"name": "Skill",
"input": {
"skill": "prompt-engineer",
"args": "create vj-engineer agent..."
}
}
The session ends abruptly after this entry with no error recorded.
Workaround
Ensure agents are invoked via the Task tool (with subagent_type), not the Skill tool. The Skill tool should only be used for actual skills defined in ~/.claude/skills/.
Additional Context
This crash is reproducible - it occurred across multiple sessions (at least 4 times) when attempting variations of prompts that trigger subagent delegation to prompt-engineer.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗