Background subagent (Agent tool) wedges before first tool call, never self-recovers, must be manually killed
Status Open
Maintainer reply None cached
Activity 1 comment · opened Aug 12, 2026
Summary
A spawned background subagent (via the Agent tool) wedged silently before producing its first assistant turn and never recovered on its own, requiring manual user stop.
Observed Signature
The subagent exhibited all of the following characteristics:
- JSONL transcript contains exactly 2
type:"user"records and ZEROtype:"assistant"records — received its initial prompt and a follow-up SendMessage, but never produced an assistant turn or tool call - Task output/status file stayed frozen at 129 bytes with an unchanged mtime for approximately 13 minutes
- Follow-up message via SendMessage never took effect — consistent with the harness only delivering queued messages at tool-call boundaries the wedged process never reached
- Only ended when user issued manual stop — task notification then reported
status: killed. Did NOT self-terminate, emit an error, or produce any diagnostic - Environment: Claude Code on Linux (Amazon Linux 2, kernel 5.10)
- Concurrency: One of several concurrently-running background subagents in the same session; the other subagents ran normally, ruling out a session-wide outage
Expected vs Actual
Expected: The subagent either progresses through turns and completes, fails with a diagnostic error, or times out gracefully.
Actual: Silent indefinite hang at the harness startup boundary, invisible until user manually checks background tasks and kills the hung process.
Reproduction
No deterministic reproduction available. This is a single observed occurrence. I am reporting in case others encounter the same signature.
Environment
- OS: Amazon Linux 2 (kernel 5.10.260-264.1061.amzn2int.x86_64)
- Claude Code version: Not captured (can provide if relevant)
- Session context: Multiple concurrent background subagents; others in the session completed normally
Next Steps for Investigation
If reproducible, check:
- Harness startup path for subagents that never produce an assistant turn
- Status file lifecycle (why it remains 129 bytes and frozen)
- SendMessage delivery gate (when/where it's dropped if the process hasn't reached a tool-call boundary)
- Linux-specific subprocess spawn/PTY handling vs macOS/Windows implementations
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗