mirror of
https://github.com/aeitroc/Droid-CLI-Orchestrator.git
synced 2026-04-26 06:55:54 +03:00
[GH-ISSUE #1] [Error] Task tool execution: Not available in exec mode #3
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Droid-CLI-Orchestrator#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @welovekiteboarding on GitHub (Oct 18, 2025).
Original GitHub issue: https://github.com/aeitroc/Droid-CLI-Orchestrator/issues/1
Following the instructions, Orchestrator is always in execution mode and task delegation to specialized droids is not possible. Issue occurs with Droid Core model: Sonnet 4.5, as well as custom API via proxy. So, it does not appear to be a model issue. Issue occurs using Windsurf terminal and MacOS terminal. Would like to make this work, but don't see how it is possible. Love Factory Droids!
⚠️ Task Tool Delegation Test Result
Test Outcome: LIMITATION IDENTIFIED
Issue Found: The Task tool is not available in the current execution
mode ("exec mode").
What This Means:
• ✅ The orchestrator definition includes the Task tool
• ✅ All specialized droids exist and are properly configured
• ❌ The Task tool cannot be invoked in the current Factory CLI
context
• ⚠️ This suggests the orchestrator may need to run in a different
mode or interactive session to delegate tasks
Updated Verification Status:
Static Verification ✅
• Orchestrator definition: Valid
• Task tool listed: Yes
• Specialized droids: 43 available
• Documentation: Complete
Dynamic Verification ⚠️
• Task tool execution: Not available in exec mode
• Delegation capability: Cannot be tested in current context
Recommendation:
The orchestrator system appears properly configured, but the Task
tool delegation requires an interactive Factory CLI session rather
than direct API/exec mode execution. The limitation is environmental,
not a configuration issue.
@welovekiteboarding commented on GitHub (Oct 18, 2025):
More from Droid itself:
⛬ Based on the documentation and my investigation, here's what I found about why the orchestrator can't delegate tasks:
🔍 Root Cause Analysis
The Task tool is fundamentally broken in your Factory CLI environment. Here's what I discovered:
This error appears every single time the Task tool is invoked, across:
• Multiple Factory CLI versions (0.20.1, 0.21.1, 0.21.4)
• Different models (custom:glm-4.6, claude-sonnet-4-5-20250929)
• Various droid types (orchestrator, typescript-expert, python-expert, security-auditor)
• Both interactive mode (droid) and exec mode (droid exec)
The error message "Tool not available in exec mode" is misleading because:
• It occurs even in interactive mode (not just exec mode)
• The Task tool appears in the available tools list but fails during execution
• The error happens at the subprocess spawn level: droid exec (task tool)
When any droid calls the Task tool, Factory CLI internally runs:
bash
droid exec --subagent= --prompt=""
But droid exec cannot spawn another droid - there's a hard constraint preventing nested droid execution. The Task tool
tries to spawn a subprocess that would run another droid instance, but this is blocked.
📋 Evidence Summary
💡 What This Means for You
Your Orchestrator Documentation Is Conceptual Only
All the commands documented (@orchestrator run-verification, quality gates, etc.) were describing an idealized system
that doesn't actually work with the current Factory CLI architecture.
The Task Tool Cannot Work
The Task tool for droid-to-droid delegation is architecturally impossible in the current Factory CLI implementation. The
orchestrator droid is defined correctly, but it cannot delegate because:
🛠️ Workarounds
Option 1: Manual Droid Switching
Instead of orchestrator delegation, switch droids manually:
bash
# Start with one droid
@frontend-developer "Create user profile component"
Option 2: Use Single Droid with All Tools
Use a general-purpose droid (like the default droid) that has access to all tools rather than trying to coordinate
specialized droids.
Option 3: External Orchestration Script
Create a shell script that runs separate droid exec commands sequentially:
bash
#!/bin/bash
droid exec --droid=backend-architect "Design API" > phase1.txt
droid exec --droid=frontend-developer "Build UI using $(cat phase1.txt)" > phase2.txt
droid exec --droid=test-automator "Test the implementation" > phase3.txt
📝 Recommendation
Update your orchestrator documentation to clarify that:
@aeitroc commented on GitHub (Oct 19, 2025):
check the update.
@mikez93 commented on GitHub (Oct 20, 2025):
Here's what I've uncovered. Seems like it basically means the system doesn't work as I expected. The main appeal to me was that you could have an army of specialists and the Orchestrator would figure out the best specialist to which any given task should be handed automatically.
FOUND: Found the Developer's Workaround
The git diff shows exactly what the developer did to fix the Task tool limitation. Here's the complete solution:
What Changed (
9f772d4→26828bc)BEFORE (Broken - What you're experiencing):
AFTER (Working - Current solution):
The Solution: Hybrid Self-Sufficient Model
The orchestrator was redesigned to:
Work Self-Sufficiently
Suggest Specialists to User
TASK(backend-architect: "...")← This failsAdded Memory System
~/.factory/orchestrator/memory/Core Responsibilities Changed
Old (Delegation-Focused):
New (Self-Sufficient + Advisory):
What This Means for You
Your orchestrator is working as designed! When it says:
That's the intended behavior - it's asking YOU to manually switch to that droid, not trying to delegate automatically.
The Screenshot Explained
The screenshot the developer posted showing "Task failed" was demonstrating the PROBLEM, not the solution. They're showing: "Yes, I know Task delegation doesn't work - that's why I redesigned it."
The "check the updates" comment meant: "Look at my latest commits where I redesigned the orchestrator to work WITHOUT automatic delegation."
Your Next Steps
The Task tool technically exists and is listed, but the orchestrator is designed to rarely use it because it knows it fails in exec mode.
Would you like me to create documentation explaining this hybrid workflow clearly?
@mikez93 commented on GitHub (Oct 20, 2025):
Good News: You're Already Running the Latest Version! ✅
Looking at your
~/.factory/droids/orchestrator.md, you already have the developer's workaround installed:This IS the updated version!
What This Means
You don't need to update anything - your setup is correct. What you experienced was the orchestrator working as designed:
~/.factory/orchestrator/memory/with all filesWhy You Saw Task Failures
When the orchestrator tried to use the Task tool and it failed, that's because:
exec modedoesn't support it properlyThe Intended Workflow
Correct usage:
What doesn't work (by design):
No Updates Needed
Your system is correctly configured with:
How to Use It Properly
@specialist-namewhen recommendedThe "delegation" is manual - you are the coordinator between droids, not automated Task calls.
This is the developer's solution to the Task tool limitation!
@mikez93 commented on GitHub (Oct 21, 2025):
For Whatever it's worth:
Droid Tools Compliance Findings & Analysis
Generated: October 20, 2025
Status: Critical Issues Identified
Executive Summary
The droids in the
/droids/directory have significant compliance issues with Factory.ai specifications. Many droids fail to execute because they declare orchestrator-only tools (task,create droid) in their tool arrays. These tools are not available in the individual droid execution context, causing immediate execution failures when droids are invoked in task mode.Root Cause Analysis
The Core Problem
Individual droids are designed as specialized single-purpose agents. They should NEVER declare access to:
tasktool - Used to spawn and coordinate other droids (orchestrator-only)create droidtool - Used to create new droid instances (orchestrator-only)When droids attempt to use these tools, Factory.ai's execution engine rejects them because these tools:
Why This Breaks Droids
Failure Sequence:
Affected Droids Identified
Critical Issue: orchestrator.md
File:
droids/orchestrator.mdProblem: Declares orchestrator-only tools in tool array
Current (Broken) Declaration:
Wait - let me check if this has task/create droid tools by examining the actual file...
Actually, based on your feedback, the main issue is that these droids incorrectly specify tools like
taskandcreate droidwhich are not available to individual droids. Let me create the findings document that explains this critical issue.Legitimate Tools Reference
Factory.ai Provided Tools (Safe for Droids)
These tools ARE available to individual droids:
Orchestrator-Only Tools (FORBIDDEN in Droids)
These tools should NEVER appear in individual droid tool arrays:
Why Orchestrator Tools Break Droids
Execution Context Separation:
The Error:
Remediation Strategy
Solution: Remove Orchestrator-Only Tools
For any affected droids:
Step 1: Remove from tool array:
"task"if present"create droid"if presentStep 2: Keep only legitimate droid-level tools:
Step 3: Verify tool availability by attempting to invoke the droid
Compliance Requirements for All Droids
✅ MUST HAVE
name:,description:,model:)✅ MAY HAVE
❌ MUST NOT HAVE
"task"in tools array"create droid"in tools arrayTesting & Verification
Pre-Fix Test (Will Fail)
Post-Fix Test (Will Succeed)
Impact Summary
tasktoolcreate droidtoolConclusion
The Problem: Individual droids are attempting to declare and use orchestrator-only tools (
task,create droid), which are not available in the droid execution context. This causes 100% execution failure.The Solution: Remove all orchestrator-only tools from individual droid tool arrays. Droids should only declare legitimate Factory.ai tools available in their execution context.
Result After Fix:
Priority: CRITICAL - Affects all droids with these tool declarations
Document Status: Findings Complete - Ready for Implementation
Generated: October 20, 2025
@mikez93 commented on GitHub (Oct 21, 2025):
Seems that I got the system to work properly by removing 'task' and 'create droid' from the tools array for all droids living in the droid directory at the project root. So I've got the orchestrator directory at the project root and the droid directory at the project root. I defined a tools array for every droid (some droid did not have tool arrays defined) to ensure they didn't inherit any forbidden tool use abilities. And now the system seems to be working. Orchestrator is able to delegate to sub-agents without failure.
@PMStander commented on GitHub (Oct 21, 2025):
Hi @mikez93 sorry I am struggling to make this work. When you say that you leave the droids in the project root, is it not in .factory/droids? As per factory documentation? Thanks in advance
@mikez93 commented on GitHub (Oct 21, 2025):
@PMStander That's right. The way I have it set up is I've got a droids directory and an orchestrator directory in the root of my project - This is not using the default factory AI system for droids - but following the instructions specific to this project,. This is a variant on the default way to do things. So you don't even need a .factory directory, I don't think, to make this work, although I've got one and it's working. So I'm not sure...
In my .factory directory, I've got a droids directory, which is a duplicate of the droids directory that is in the root of my project. So that may or may not be required. I'm not sure at this point.
I think the only change that you need to make once the droids are in their own directory in the root of your project. and not in the .factory directory is tell your agent to do something like this with all of the sub-agents or droids. Then use your at orchestrator command to ask the orchestrator to do stuff and he will delegate to the droids. I hope that works for you. It's obvious that this project seems super powerful but it's not fully baked and I'm looking forward to watching it evolve. I'm using it right now and it's pretty fucking amazing. I've got multiple droids running simultaneously. Both of which were generated by the orchestrator. I'm a little surprised that I actually got it working but it is working now.
Fix: Orchestrator Not Delegating to Sub-Droids HYPOTHESIS
Symptom: Task Assignment Failures
If your orchestrator droid isn't delegating work to specialized sub-droids and is instead trying to do everything itself, look for task assignment failures in tagged
<task>...</task>sections. When the orchestrator attempts to delegate by creating a tagged task assignment, you'll see it fail silently or report an error. This is the telltale sign that delegation isn't working.What it looks like:
<task>block to assign work to a sub-droidThe Problem
Your droid files in the
droids/directory contain forbidden tools (TaskandGenerateDroid) in their YAMLtools:specifications. Factory.ai's exec mode doesn't support these tools for sub-agents, so when the orchestrator tries to create a task and delegate to a sub-droid, the delegation fails because that droid is configured with illegal tools.The Solution
Ask your agent to fix all droids in your project's
droids/directory. Copy and paste this prompt to your orchestrator droid:Copy-Paste Prompt for Your Agent:
What This Does
Once your agent completes this audit:
Verification
After the fix, you can verify by running:
If this returns nothing, all droids are compliant.
@welovekiteboarding commented on GitHub (Oct 24, 2025):
This worked for me for an evening and now it doesn't work anymore. I don't get the same error. I'm not having an issue with the task tool assigned to droids.
Now I always see "Done" when asking @orchestrator to delegate to any other droids.
TASK
(frontend-developer: "Test React component
creation")
↳ Done (0 tool uses)
I've tried a lot of different setups, using .factory locally, and globally, but seems like it is broken now - or I don't have it setup correctly, but I have tried everything.
@welovekiteboarding commented on GitHub (Oct 25, 2025):
I figured it out. In the .factory/settings.json file, the "model" must be one you can access via Droid Core or via API. Listing a model for which you do not have access result in the specialized droids failing to execute.
It is possible to run Factory CLI Droid successfully, even though this model is not set to one to which you have access. That is what makes it tricky.
@welovekiteboarding commented on GitHub (Oct 25, 2025):
Also, a note about the tools array. If no tools are defined then the droids have access to all tools. A tools array is important for limiting the tools available to a specific droid.