# Fix Critical MCP-Task Tool Integration Disconnect
## Problem Summary
Task tool agents operate in complete isolation from MCP communication protocol, creating false success reporting and breaking agent coordination workflows.
## Root Cause
Task tool launches agents in isolated processes that cannot access MCP tools or communicate with the MCP server, yet they generate detailed "success" reports without actually performing work.
## Immediate Actions Required
### 1. Verification Protocol Implementation
- Create systematic MCP verification for all agent claims
- Implement cross-validation between agent reports and MCP progress tracking
- Add safety checks to prevent false confidence
### 2. Direct MCP Integration Workaround
- Document manual MCP coordination patterns
- Replace Task tool usage with direct MCP workflow
- Test end-to-end agent coordination without Task tool
### 3. Evidence Documentation
- Document real-world evidence of the disconnect
- Create reproduction steps
- Establish testing framework for MCP integration
## Success Criteria
- Zero false success reports from agents
- 100% MCP progress tracking correlation with actual work
- Working multi-agent coordination workflows
- Complete task lifecycle management
## Priority: CRITICAL
This breaks fundamental agent coordination architecture and creates dangerous false confidence in completed work.
## Related GitHub Issue
#10 - CRITICAL: Task Tool agents don't use MCP communication protocol
## MCP Task Management Protocol
### IMPORTANT: Creating Tasks
**ALWAYS** use `create_task` for ANY new task:
```javascript
create_task({
agent: "target-agent", // Required: target agent name
taskName: "task-name", // Required: clean name (NO timestamps)
content: "task details", // Optional: include for delegation
taskType: "delegation", // Optional: delegation|self|subtask
parentTask: "parent-id" // Optional: for subtasks only
})
```
### CRITICAL: Task Workflow
**YOU MUST** follow this exact sequence:
1. `check_assigned_tasks()` - **ALWAYS** start here
2. `start_task(taskId)` - **REQUIRED** before any work
3. `submit_plan(content)` - **MANDATORY** before implementation
4. `report_progress(updates)` - **UPDATE** after each step
5. `mark_complete(status, summary, reconciliation_options)` - **ONLY** when fully done
### MANDATORY: Todo Integration
**YOU MUST ALWAYS:**
- **CREATE** TodoWrite items for EVERY task step
- **UPDATE** todos to 'in_progress' BEFORE starting work
- **MARK** todos 'completed' IMMEDIATELY after finishing
- **NEVER** have more than ONE 'in_progress' item
- **INCLUDE** MCP operations as todo items
### REQUIRED Plan Format
**ALL PLANS MUST USE CHECKBOX FORMAT:**
Each trackable item MUST follow this structure:
```
- [ ] **Step Title**: Brief one-line description
- Action: Specific command or task
- Expected: Success criteria
- Error: Handling approach if fails
- Notes: Additional context (optional)
```
**Example Plan Format:**
```markdown
## Testing Plan
- [ ] **Test Discovery**: Identify all test configurations
- Run: `pnpm list --filter "*" --depth 0`
- Scan for: jest.config.*, *.test.ts, *.spec.ts files
- Expected: List of all test files and configurations
- Error handling: If no tests found, document as critical issue
- Dependencies: Node.js and pnpm installed
- [ ] **Test Execution**: Run all test suites
- Command: `pnpm test:all --coverage`
- Success criteria: All tests pass with >80% coverage
- Failure action: Document failed tests with error messages
- Output location: ./coverage/lcov-report/index.html
```
**VALIDATION RULES:**
- Minimum ONE checkbox required (use `- [ ]` format exactly)
- Each checkbox must have bold title: `**Title**:`
- Each checkbox must have 2-5 detail bullets
- NO [PENDING]/[COMPLETE] status markers allowed
- Use ONLY checkboxes for tracking
### CRITICAL RULES - NEVER VIOLATE
- **NEVER** create duplicate tasks (auto-prevented)
- **NEVER** add timestamps to taskName
- **ALWAYS** update progress after EACH action
- **ALWAYS** sync todos with actual work
- **NEVER** skip submit_plan step
- **ONLY** mark complete when 100% done
- **ALWAYS** use checkbox format in plans
- **UNDERSTAND** reconciliation modes for mark_complete
### Task Completion Reconciliation
**mark_complete** supports intelligent reconciliation when plan checkboxes remain unchecked:
**4 Reconciliation Modes:**
1. **`strict`** (default) - Requires ALL checkboxes checked before DONE status
- Use when: Plan adherence is critical
- Behavior: Rejects DONE with unchecked items, allows ERROR
2. **`auto_complete`** - Automatically marks unchecked items complete
- Use when: Work is done but forgot to check boxes
- Behavior: Updates PLAN.md with all items checked
3. **`reconcile`** - Accept completion with explanations for variances
- Use when: Completed work differently than planned
- Requires: reconciliation_explanations object
- Behavior: Creates variance report with justifications
4. **`force`** - Override completion despite unchecked items
- Use when: Emergency completion, plan became obsolete
- Behavior: Documents forced override with warnings
**Reconciliation Examples (Essential Examples for Proper Usage):**
```javascript
// Example 1: Default strict mode (recommended example)
mark_complete({
status: 'DONE',
summary: 'All work completed as planned',
agent: 'agent-name'
// No reconciliation = strict mode
});
// Example 3: Auto-complete forgotten checkboxes example
mark_complete({
status: 'DONE',
summary: 'Forgot to check boxes during work',
agent: 'agent-name',
reconciliation_mode: 'auto_complete'
});
// Example 4: Reconcile with explanations (detailed example)
mark_complete({
status: 'DONE',
summary: 'Core work done, some items handled differently',
agent: 'agent-name',
reconciliation_mode: 'reconcile',
reconciliation_explanations: {
'Database Setup': 'Used existing schema, setup not needed',
'Performance Testing': 'Deferred to next sprint per stakeholder decision'
}
});
// Force completion in emergency
mark_complete({
status: 'DONE',
summary: 'Emergency deployment, remaining items moved to backlog',
agent: 'agent-name',
reconciliation_mode: 'force'
});
```
**BEST PRACTICES:**
- **Update checkboxes** as you complete work (prevents reconciliation need)
- **Use strict mode** by default (ensures plan accountability)
- **Provide clear explanations** when using reconcile mode
- **Reserve force mode** for genuine emergencies only
- **Document reconciliation decisions** thoroughly in summary
### Diagnostic Tools
- `track_task_progress(agent, taskId)` - Monitor progress
- `get_full_lifecycle(agent, taskId)` - View task history
**REMEMBER:** Update todos, use checkbox format in plans, and report progress CONTINUOUSLY!