Programmatic Task Tool: Missing Progress Feedback in SDK Mode
Bug Description
Summary
The Task tool provides excellent visibility in interactive Claude Code but offers no progress feedback when used via SDK or --print mode, creating poor UX for long-running analyses in programmatic integrations.
Current Behavior
Interactive Mode (Works Great)
In full Claude Code visual mode, users see all tool calls, file reads, and analysis steps in real-time as the Task executes. The experience is quite pleasant with full transparency.
SDK/Non-Interactive Mode (Problem)
When using Claude Code via SDK or --print --output-format stream-json:
- Parent session shows only:
🔧 Tool: Task {"description":"...", "prompt":"..."} - Complete blackout - no updates until child session finishes entirely
- Child session is invisible to monitoring tools and session management
- Returns only final result with no intermediate progress
Problem
- SDK Integration UX: Users wait minutes with zero feedback during long analyses
- No Debugging: When Task fails in SDK mode, no visibility into failure point
- Invisible Child Sessions: Monitoring tools can't track or manage Task child sessions
- Mode Inconsistency: Great experience in interactive mode, poor experience in SDK mode
Real-World Example
A TUI analysis Task took 5+ minutes with extensive file reading. Via SDK, users see only:
{"type":"assistant","message":{"content":[{"type":"tool_use","id":"...","name":"Task","input":{"description":"Check TUI implementation status","prompt":"..."}}]}}
Then complete silence until final result - no indication if it's working, stuck, or failed.
Use Cases
- SDK Integrations: Providing user feedback during long Task operations
- Monitoring Tools: Tracking all Claude Code activity including Task children
- Debugging: Understanding where Task operations fail in automated workflows
- Session Management: Properly handling Task child sessions in daemon architectures
Context
Discovered first when running into https://github.com/anthropics/claude-code/issues/1920. Interactive Claude Code already provides excellent Task visibility - this specifically addresses the SDK/programmatic usage gap.
Impact
This would bring SDK Task tool experience closer to the excellent interactive experience, making Task suitable for complex analyses in programmatic environments.
Environment Info
- Platform: macos
- Terminal: ghostty
- Version: 1.0.18
- Feedback ID: 459f0aa2-43db-4b9d-b34d-f3203663a8b3
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗