Claude Code Sdk Hanging Bug
Description
Demonstrates parallel execution hanging bug in Claude Code SDK that blocks multi-agent AI systems
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Claude CLI Hanging Bug - Blocks Multi-Agent AI
Claude CLI hangs when running multiple instances in parallel. This prevents building multi-agent AI systems.
See The Bug (1 minute)
# Clone and test:
git clone https://github.com/ericbuess/claude-code-sdk-hanging-bug
cd claude-code-sdk-hanging-bug
./test-hanging.sh
You'll see:
- ❌ Parallel execution hung (the critical bug!)
- ✅ Single operations work fine
See The Fix Working
# Run the fix demo:
./wrapper-fix/test-working.sh
All operations now work! ✅
The Problem
When you try to run multiple Claude agents:
claude -p "Agent 1" & claude -p "Agent 2" & # This hangs!
The Solution
We use `dd` for I/O operations to bypass the shell mechanisms causing the hang. See `wrapper-fix/claude-wrapper.sh` for implementation.
Why This Matters
Without fixing this, we cannot build:
- Parallel AI agents
- Multi-agent teams
- Self-organizing systems
Example use case:
# What we want to build:
claude -p "Research agent: Find best practices" &
claude -p "Code agent: Implement solution" &
claude -p "Test agent: Validate the code" &
# All agents work together = powerful AI team
**This one bug blocks the entire future of multi-agent AI.**
Technical Note
The issue appears to be file descriptor inheritance when spawning parallel processes. This behavior is undocumented and particularly affects Claude when it tries to spawn other Claude instances (recursive multi-agent systems).
**Important**: While some operations work when humans run them, they often fail when Claude attempts the same operations, making automated multi-agent systems unreliable.
Request for Anthropic
Please fix parallel process spawning in Claude CLI to enable multi-agent AI systems. The wrapper demonstrates that proper process isolation solves the issue.
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI