-
Notifications
You must be signed in to change notification settings - Fork 54
Specialist Droid hangs on requests. #211
Description
Issue Report: Specialist Droid Tasks Hang Without Completion
Issue Summary
Specialist droid agents (invoked via Task tool) acknowledge task requests but fail to complete execution, causing workflow to hang indefinitely without returning results.
Priority
HIGH - Blocks workflow execution and forces users to manually perform tasks that should be automated by specialist droids.
Affected Components
- Tool:
Task(task-cli) - Affected Droids:
flutter-artisan-ui-specialist- Potentially others (not yet tested)
- Agent Type: Custom specialist droids from
.factory/droids/
Environment Details
- Platform: Pop!_OS 24.04 LTS (Linux)
- Project: portal
- Branch: mobile_application
- Factory Session: Multiple sessions observed
- Droid Location: Personal droids in
~/.factory/droids/
Detailed Description
When invoking a specialist droid using the Task tool with a detailed prompt, the droid:
- ✅ Acknowledges the task with a brief response
- ❌ Never returns the actual results or completion report
- ❌ Hangs the workflow indefinitely
- ❌ No error messages or timeout indicators
The primary agent (Droid) must then manually execute the tasks that should have been delegated to the specialist.
Steps to Reproduce
Attempt 1: Flutter Prerequisites Verification
Task({
subagent_type: "flutter-artisan-ui-specialist",
description: "Verify Flutter prerequisites",
prompt: `Please verify all prerequisites for the Flutter mobile project setup as specified in /mnt/nvme1-data/home/s/development/portal/MOBILE_APPLICATION/Documentation/planning/A3-Mobile_Project_Setup_Tasks.md
Your task is to check the following prerequisites and provide a detailed report:
1. **Flutter SDK 3.0+**: Check if Flutter is installed and verify version using 'flutter --version'
2. **Dart SDK 3.0+**: Check if Dart is installed and verify version using 'dart --version'
3. **Android Studio & SDK**: Check for Android SDK installation and configuration
4. **Android Emulator/Device**: Check if any Android emulators are available or devices connected using 'flutter devices'
5. **Git Configuration**: Verify git is installed and configured using 'git --version' and 'git config --list'
6. **IDE Setup**: Check for Flutter/Dart plugin support in available IDEs
7. **Flutter Doctor**: Run 'flutter doctor -v' to get a comprehensive health check
For each prerequisite:
- Indicate if it's ✅ PASS or ❌ FAIL
- Provide the actual version/status found
- If failed, provide clear instructions on how to fix it
- Include any warnings or recommendations from 'flutter doctor'
Please return a comprehensive report with:
1. Summary table of all prerequisites (pass/fail)
2. Detailed findings for each check
3. Any actionable recommendations or fixes needed
4. Overall readiness assessment (READY / NEEDS ATTENTION)
This is a READ-ONLY research task - do NOT install or modify anything. Just verify what's currently installed.`
})Expected Response: Detailed multi-section report with:
- Summary table
- Version checks for each prerequisite
- Pass/fail status
- Recommendations
- Overall assessment
Actual Response:
I'll verify all Flutter prerequisites for the mobile project setup. Let me run diagnostic commands to check each requirement.
Result: ❌ Hangs - No further output
Attempt 2: Flutter Prerequisites Validation
Task({
subagent_type: "flutter-artisan-ui-specialist",
description: "Validate Flutter prerequisites",
prompt: `You are validating that all Flutter development prerequisites are correctly met for the wp mobile application project.
Please perform a comprehensive validation of the following prerequisites and confirm each one is production-ready:
## Prerequisites to Validate:
1. **Flutter SDK 3.0+**
- Run: 'flutter --version'
- Verify version is 3.0 or higher
- Check channel is stable
- Confirm installation path is valid
2. **Dart SDK 3.0+**
- Run: 'dart --version'
- Verify version is 3.0 or higher
- Confirm it's bundled with Flutter correctly
[... full detailed instructions ...]
## Final Assessment:
Provide one of the following assessments:
- **✅ READY FOR DEVELOPMENT**: All prerequisites met, can proceed with Flutter project setup
- **⚠️ READY WITH WARNINGS**: Prerequisites met but minor issues to address
- **❌ NOT READY**: Critical prerequisites missing, must fix before proceeding
Include specific action items if any fixes are needed.
This is a READ-ONLY validation task. Do not install or modify anything.`
})Expected Response: Comprehensive validation report with final assessment.
Actual Response:
I'll perform a comprehensive validation of all Flutter development prerequisites for the wp mobile application project.
Result: ❌ Hangs - No further output
Expected Behavior
- Droid acknowledges task
- Droid executes commands/research
- Droid compiles results into structured report
- Droid returns complete results to primary agent
- Primary agent receives results and continues workflow
- User sees the specialist droid's output
Actual Behavior
- Droid acknowledges task ✅
- Droid presumably starts execution ❓
- Workflow hangs indefinitely ❌
- No results returned ❌
- Primary agent cannot continue
- User must manually intervene or primary agent must redo work
Impact on Workflow
Critical Issues:
- Blocks automation: Tasks that should be delegated cannot be completed
- Forces manual execution: Primary agent must execute commands directly
- Wastes tokens: Task acknowledgment consumes tokens without providing value
- Reduces efficiency: Parallel execution of specialist tasks impossible
- User frustration: Expected automation doesn't work
Workarounds Used:
- Primary agent executes tasks directly using
Executetool - Manual verification by user
- Avoiding specialist droids altogether
Pattern Analysis
Consistent Behavior:
- Both attempts used same specialist droid:
flutter-artisan-ui-specialist - Both were READ-ONLY research/validation tasks
- Both had detailed, structured prompts
- Both requested multi-section formatted reports
- Both involved running shell commands (
flutter,dart,git, etc.) - Both acknowledged but never completed
Differences:
- Different prompt lengths
- Different requested output formats
- Same expected workflow (run commands → compile report → return results)
Droid Configuration
Droid: flutter-artisan-ui-specialist
Location: ~/.factory/droids/flutter-artisan-ui-specialist
Type: Personal droid
Description: "Flutter Artisan is an expert-level AI agent specializing in crafting production-ready Flutter applications with exceptional UI/UX design."
Model: inherit
Relevant Excerpt from Droid Config:
Use this droid when you are in spec mode and have finished presenting your spec and are ready to code. This will prompt the user to exit spec mode.
Hypothesis
Possible Causes:
-
Task Timeout/Failure Without Error Reporting:
- Droid may be timing out but not reporting failure
- No error propagation back to primary agent
-
Command Execution Issues:
- Droid may lack permission to execute shell commands
- Environment isolation preventing command execution
- Commands hang waiting for input (though all are non-interactive)
-
Response Size Issues:
- Droid may be generating response but truncation/size limits prevent delivery
- No streaming of partial results
-
Context/Prompt Issues:
- Droid prompt parsing failure
- Unclear instructions causing infinite loop
- Droid waiting for clarification but no feedback channel
-
Task Tool Implementation Bug:
- Task invocation succeeds but result collection fails
- Communication channel between droid and primary agent broken
- No timeout mechanism for hung tasks
-
Droid Configuration Issues:
- Droid not designed for this type of task
- Missing capabilities for command execution
- Model inheritance issues
Diagnostic Questions for Factory Team
-
Are there logs showing droid execution progress?
- Can you see if the droid actually starts?
- Are commands being executed?
- Where does execution stop?
-
Is there a timeout mechanism for specialist droids?
- How long should a droid task run before timing out?
- Are timeouts reported back to the primary agent?
-
What are the limitations of specialist droids?
- Can they execute shell commands?
- Can they use other tools (Execute, Read, Grep)?
- What capabilities do they inherit?
-
How is communication handled?
- How do droids return results to the primary agent?
- Is there a size limit on responses?
- Can droids stream results or only return final output?
-
Is there error handling?
- If a droid crashes, is an error returned?
- If a command fails, can the droid report it?
- Are errors propagated to the user?
Reproduction Data
Timestamps:
- First Attempt: During session working on A3 document creation
- Second Attempt: Immediately after first attempt failed
- Manual Workaround: Successful execution using Execute tool directly
Commands That Would Have Been Run:
flutter --version
dart --version
flutter devices
flutter emulators
flutter doctor -v
git --version
git config --listAll Commands Work When Run Directly:
✅ All commands execute successfully when primary agent uses Execute tool
✅ No permission issues
✅ No environment issues
✅ Commands return results within seconds
Suggested Investigation
- Check droid execution logs for both attempts
- Verify Task tool implementation handles long-running tasks
- Test with simpler task to isolate issue:
Task({ subagent_type: "flutter-artisan-ui-specialist", description: "Simple echo test", prompt: "Please respond with: 'Test successful - droid communication working'" })
- Test with different specialist droid to see if issue is droid-specific
- Add timeout and error reporting to Task tool if missing
- Document specialist droid capabilities and limitations
Temporary Mitigation
Current Workaround: Primary agent executes tasks directly instead of delegating to specialist droids.
Trade-offs:
- ✅ Tasks complete successfully
- ✅ Results returned immediately
- ❌ Cannot leverage specialist expertise
- ❌ No parallel execution
- ❌ Primary agent token usage instead of specialist
Request for Factory Team
Please investigate and provide:
- Root cause analysis of why specialist droids hang
- Fix or patch to enable proper droid task completion
- Documentation of specialist droid capabilities and limitations
- Best practices for invoking specialist droids
- Error handling improvements for failed droid tasks
- Timeout mechanisms to prevent indefinite hangs
Additional Context
Project Context: Developing Flutter mobile application for wp service. Need to validate development environment prerequisites before proceeding with project setup.
User Impact: User explicitly requested specialist droid validation after manual checks were completed, expecting expert-level validation and professional report format from the Flutter specialist.
Expected User Experience:
- User requests specialist validation
- Specialist provides comprehensive, expert-level report
- User gains confidence in environment readiness
- Workflow continues smoothly
Actual User Experience:
- User requests specialist validation
- Workflow hangs with no feedback
- User must intervene and ask for workaround
- Trust in specialist droid automation diminished
Test Case for Verification
Once fixed, please verify with this test:
Task({
subagent_type: "flutter-artisan-ui-specialist",
description: "Test prerequisites check",
prompt: `Please run the following commands and report the results:
1. Run: flutter --version
2. Run: dart --version
3. Run: flutter doctor
Provide a simple report with the output of each command.`
})Expected: Report with command outputs returned within reasonable time (< 60 seconds)
Related Documentation
- Project:
/mnt/nvme1-data/home/s/development/portal/ - Setup Guide:
MOBILE_APPLICATION/Documentation/planning/A3-Mobile_Project_Setup_Tasks.md - Droid Config:
~/.factory/droids/flutter-artisan-ui-specialist - Session Context: Working on mobile application setup, Phase 1 prerequisites verification
Reported By: User via Droid agent
Date: Current session
Priority: HIGH
Status: OPEN
Assignee: Factory Droid Team
Appendix: Manual Execution Results (For Reference)
All commands execute successfully when run directly:
$ flutter --version
Flutter 3.32.8 • channel stable
Framework • revision edada7c56e
Engine • revision ef0cd00091
Tools • Dart 3.8.1 • DevTools 2.45.1
$ dart --version
Dart SDK version: 3.8.1 (stable)
$ flutter devices
Found 2 connected devices:
Linux (desktop) • linux • linux-x64
Chrome (web) • chrome • web-javascript
$ flutter emulators
1 available emulator:
Shaun_Pixel_8_Pro_API_35 • Google • android
$ flutter doctor -v
[✓] Flutter (Channel stable, 3.32.8)
[!] Android toolchain (Android SDK version 36.1.0-rc1)
! Some Android licenses not accepted
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2025.1.2)
[✓] VS Code
[✓] Connected device (2 available)
[✓] Network resourcesAll prerequisites verified as PASSING with one minor warning (Android licenses).