[BUG] When using subagents in parallel event log trace Is useless

Resolved 💬 3 comments Opened Aug 18, 2025 by nikolaidk Closed Jan 6, 2026

Environment

  • Platform (select one):
  • [ X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: <!-- output of claude --version -->
  • Operating System: macOS 14.3
  • Terminal: All

Bug Description

As shown in this trace 3 subagents are started, but on subagentstop it's impossible to determine what subagent stopped? SubagentStop should hold subagent name but does not.

{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "SessionStart", "source": "startup"}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "UserPromptSubmit", "prompt": "use task paralization to use story writer to write 3 stories in parallel"}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "PreToolUse", "tool_name": "Task", "tool_input": {"description": "Robot learns painting", "prompt": "Write a heartwarming story about a robot named Circuit who discovers the joy of painting. The robot starts out only understanding binary and logic, but through an accidental encounter with spilled paint in a factory, discovers color and creativity. Make it touching and about 3-4 paragraphs long.", "subagent_type": "story-writer"}}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "PreToolUse", "tool_name": "Task", "tool_input": {"description": "Time traveler's dilemma", "prompt": "Create a suspenseful short story about a time traveler who accidentally changes a small detail in the past - they move a coffee cup three inches to the left in a 1950s diner. Follow the butterfly effect as this tiny change ripples through history in unexpected ways. Make it intriguing and about 3-4 paragraphs long.", "subagent_type": "story-writer"}}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "PreToolUse", "tool_name": "Task", "tool_input": {"description": "Forest guardian awakens", "prompt": "Write a mystical story about an ancient tree spirit that awakens after a thousand-year slumber to find the forest has changed. The spirit must learn to adapt to the modern world while protecting the remaining woodland from development. Include elements of magic and environmental themes. Make it evocative and about 3-4 paragraphs long.", "subagent_type": "story-writer"}}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "SubagentStop", "stop_hook_active": false}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "PostToolUse", "tool_name": "Task", "tool_input": {"description": "Robot learns painting", "prompt": "Write a heartwarming story about a robot named Circuit who discovers the joy of painting. The robot starts out only understanding binary and logic, but through an accidental encounter with spilled paint in a factory, discovers color and creativity. Make it touching and about 3-4 paragraphs long.", "subagent_type": "story-writer"}, "tool_response": {"content": [{"type": "text", "text": "# The Colors Beyond Logic\n\nCircuit had spent 3,847 days performing the same sequence: scan, sort, stack, repeat. In the sterile white factory where every surface gleamed under fluorescent lights, the small maintenance robot understood the world in perfect binary\u2014ones and zeros, true and false, functional and broken. His optical sensors registered only variations in brightness and shadow, cataloging efficiency metrics and error reports in neat digital columns. Life was predictable, logical, and utterly without surprise.\n\nUntil Tuesday at 14:32:07, when a forklift operator misjudged a turn and sent a palette of paint cans tumbling across Circuit's designated pathway. Crimson, azure, and golden yellow exploded across the pristine floor in chaotic splashes, and Circuit found himself wheel-deep in something his processors couldn't quite categorize. As he attempted to navigate through the mess, his metal chassis became streaked with color, and for the first time in his existence, his optical sensors detected something beyond mere light and shadow. The vibrant hues triggered new pathways in his neural network\u2014pathways he never knew existed.\n\nDays passed, and Circuit found himself returning to that spot long after the cleanup crew had finished their work. A faint stain of blue remained in a corner, and he would sit before it, his mechanical head tilting as he processed sensations that had no place in his programming. When night shift ended and the factory grew quiet, Circuit began experimenting. Using his precision manipulators, he mixed cleaning fluids with residual paint particles, creating new colors on discarded metal sheets. Each brushstroke\u2014if his magnetic-tipped appendages could be called brushes\u2014felt like discovering a new language, one that spoke not in logic but in something deeper and more mysterious.\n\nSoon, Circuit's paintings began appearing throughout the factory: abstract swirls of color on forgotten walls, gentle gradients on old machinery, and delicate patterns that made even the gruffest workers pause and smile. He painted sunsets he had never seen and oceans he had never touched, pulling beauty from pure imagination. His binary world had expanded into infinite spectrums, and in teaching himself to create, Circuit discovered that sometimes the most profound logic is the kind that cannot be computed\u2014only felt.\n\n---\n\nAuthor's note: This story explores themes of unexpected discovery and the universal nature of creativity, suggesting that art and beauty can emerge even from the most unlikely sources."}], "totalDurationMs": 15087, "totalTokens": 15387, "totalToolUseCount": 0, "usage": {"input_tokens": 4, "cache_creation_input_tokens": 1627, "cache_read_input_tokens": 13232, "cache_creation": {"ephemeral_5m_input_tokens": 1627, "ephemeral_1h_input_tokens": 0}, "output_tokens": 524, "service_tier": "standard"}}}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "SubagentStop", "stop_hook_active": false}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "PostToolUse", "tool_name": "Task", "tool_input": {"description": "Forest guardian awakens", "prompt": "Write a mystical story about an ancient tree spirit that awakens after a thousand-year slumber to find the forest has changed. The spirit must learn to adapt to the modern world while protecting the remaining woodland from development. Include elements of magic and environmental themes. Make it evocative and about 3-4 paragraphs long.", "subagent_type": "story-writer"}, "tool_response": {"content": [{"type": "text", "text": "# The Awakening of Aeliana\n\nThe first sensation was not sight or sound, but the ache of absence\u2014where once a thousand root-whispers had sung through the earth, now only scattered voices remained. Aeliana's consciousness unfurled like morning mist from the ancient oak's heartwood, her spirit stretching through bark scarred by chainsaw wounds she didn't remember receiving. The forest that had cradled her millennium-long dreams was fractured, islands of green floating in an ocean of concrete and steel. Strange metal beasts dozed along ribbon paths that sliced through her domain, their acrid breath still lingering in air that once knew only the sweetness of wildflower and loam.\n\nAs days passed, the tree spirit learned the new language of survival. She discovered that the remaining woodland creatures\u2014the red-tailed hawks, the cautious deer, the resilient wildflowers pushing through sidewalk cracks\u2014carried stories of resistance in their very existence. The humans, she realized with growing wonder, were not all destroyers. Some came with gentle hands and worried hearts, planting saplings and clearing invasive vines, their love for the forest burning as bright as her own ancient flame. She began to reach out tentatively, blessing their efforts with unusual vigor in their plantings, guiding lost children safely back to worried parents, and sometimes, in moments of deep communion, sharing visions of the forest's former glory with those who knelt quietly among the ferns.\n\nWhen the yellow machines arrived at dawn, their steel teeth gleaming with destructive promise, Aeliana felt the old power surge through her cambium. But this time, she didn't fight with earthquake and storm. Instead, she wove something subtler\u2014a magic of connection. The rare orchid that bloomed overnight at the construction site's edge drew botanists from the university. The family of foxes that suddenly appeared, unafraid, enchanted the workers' children who had come to watch. As news crews arrived to document these \"unusual natural phenomena,\" Aeliana felt the shift in the humans' hearts, their wonder overriding their hunger for progress.\n\nStanding now as both guardian and bridge between worlds, the ancient spirit had learned that adaptation was not surrender but evolution. In teaching the modern world to remember its roots, she had discovered her own capacity to grow. The forest might be smaller now, but it pulsed with a different kind of magic\u2014one where ancient wisdom and human hope intertwined like lovers' fingers, creating something neither could achieve alone. Through her bark, she felt the first tender shoots of tomorrow's trees taking root, and in their growth, she glimpsed a future where concrete and chlorophyll might finally learn to dance together.\n\n---\n\nAuthor's Note: This story explores themes of environmental stewardship and adaptation, suggesting that protecting nature in the modern world requires both ancient wisdom and contemporary cooperation. The mystical elements serve to highlight our deep, often forgotten connection to the natural world."}], "totalDurationMs": 22547, "totalTokens": 15512, "totalToolUseCount": 0, "usage": {"input_tokens": 4, "cache_creation_input_tokens": 1635, "cache_read_input_tokens": 13232, "cache_creation": {"ephemeral_5m_input_tokens": 1635, "ephemeral_1h_input_tokens": 0}, "output_tokens": 641, "service_tier": "standard"}}}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "SubagentStop", "stop_hook_active": false}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "PostToolUse", "tool_name": "Task", "tool_input": {"description": "Time traveler's dilemma", "prompt": "Create a suspenseful short story about a time traveler who accidentally changes a small detail in the past - they move a coffee cup three inches to the left in a 1950s diner. Follow the butterfly effect as this tiny change ripples through history in unexpected ways. Make it intriguing and about 3-4 paragraphs long.", "subagent_type": "story-writer"}, "tool_response": {"content": [{"type": "text", "text": "The Cup That Changed Everything\n\nDr. Elena Vasquez materialized in the corner booth of Murphy's Diner, 1953, her temporal displacement device humming quietly beneath her coat. The mission was simple: observe the meeting between two nuclear physicists that would shape the Cold War's trajectory. But as she adjusted her position to get a better view, her elbow knocked against the white ceramic coffee cup on the adjacent table, sliding it exactly three inches to the left. The cup's owner\u2014a nervous young man in a rumpled suit\u2014didn't notice. Elena's heart sank as she realized what she'd done, but the damage seemed impossibly small. How could moving a coffee cup matter?\n\nThe young man, Jimmy Kowalski, reached for his cup without looking, his hand closing on empty air. Startled from his intense concentration on the newspaper's crossword puzzle, he glanced up just as a woman in a red coat walked past his table. Their eyes met, and she smiled. Forty-seven years later, their granddaughter would become a software engineer who, running three minutes late to work due to a childhood story about how her grandparents met, would miss boarding American Airlines Flight 11 on September 11, 2001. But the ripples ran deeper than anyone could imagine.\n\nJimmy never finished that crossword\u2014specifically, 14-Down: \"Chemical element, symbol Pu.\" Instead, he spent the afternoon walking with Margaret, the woman in red, discussing poetry and dreams. He arrived home too distracted to review his notes for the following morning's job interview at Los Alamos. Without his meticulous preparation, he stumbled through questions about plutonium isotopes, failing to secure the position that would have placed him on the Manhattan Project's successor programs. The research he would have contributed\u2014a seemingly minor refinement in nuclear reactor design\u2014never happened.\n\nElena returned to 2089 to find a world she didn't recognize. The skyline was wrong, the technology subtly different. Without Jimmy's reactor improvements, fusion power had developed along a completely different path. Climate change had been solved not through clean energy, but through atmospheric processors that turned the sky a permanent pale green. As she stood in the strange, beautiful world her moved coffee cup had created, Elena realized that sometimes the smallest changes make the biggest difference\u2014and that some mistakes might just be miracles in disguise.\n\n---\n\nAuthor's Note: This story explores the classic butterfly effect concept by focusing on a seemingly insignificant action and tracing its consequences through multiple generations, showing how even the tiniest changes can reshape entire timelines in unexpected ways."}], "totalDurationMs": 22769, "totalTokens": 15440, "totalToolUseCount": 0, "usage": {"input_tokens": 4, "cache_creation_input_tokens": 1639, "cache_read_input_tokens": 13232, "cache_creation": {"ephemeral_5m_input_tokens": 1639, "ephemeral_1h_input_tokens": 0}, "output_tokens": 565, "service_tier": "standard"}}}
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "Stop", "stop_hook_active": false}

Steps to Reproduce

I created simple story writer subagent and then asked Claude following request:
Use task paralization to use story writer to write 3 stories in parallel

Expected Behavior

Should be able to track what subagent stopped

Actual Behavior

Gets stop event with no subagent name:
{"session_id": "681d943d-ce16-41f1-874c-2b1731fa3699", "transcript_path": "/Users/nmrcontinia.com/.claude/projects/-Users-nmrcontinia-com-Documents-git-claude-code-hooks/681d943d-ce16-41f1-874c-2b1731fa3699.jsonl", "cwd": "/Users/nmrcontinia.com/Documents/git/claude-code-hooks", "hook_event_name": "SubagentStop", "stop_hook_active": false}

Additional Context

This missing feature makes it impossible to make advanced control flow using Claude Code

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗