ericbuess

Claude Code SDK Hanging Bug — AI skill for Claude Code

AI community

Demonstrates parallel execution hanging bug in Claude Code SDK that blocks multi-agent AI systems.

How to install Claude Code SDK Hanging Bug

This entry records only its repository, not the path inside it, so there is no exact command to give. Open ericbuess/claude-code-sdk-hanging-bug and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Code SDK Hanging Bug does

Demonstrates parallel execution hanging bug in Claude Code SDK that blocks multi-agent AI systems.

Alternatives in AI

  • Hexstrike AI — HexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomousl 8.2k ★
  • Business Model — Generate Business Model Canvas with all 9 building blocks 7.8k ★
  • Open Multi Agent — TypeScript multi-agent orchestration engine — one runTeam() call from goal to result 5.8k ★

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.