Skip to content

Bug: taskctl pipeline - adversarial-pipeline cannot record verdict due to permission filtering #387

@randomm

Description

@randomm

What happened

The adversarial-pipeline agent outputs a verdict but cannot call taskctl verdict to record it. Error message: "WORKFLOW_ERROR: Cannot complete review - taskctl MCP tool not available for recording verdict."

This causes the pipeline to stall because verdicts are not recorded, preventing the Pulse loop from transitioning tasks correctly.

Root Cause

The taskctl tool is being filtered out by the permission system in src/session/llm.ts:resolveTools():

  1. adversarial-pipeline agent has permission: [] (empty array) in pulse-scheduler.ts:372
  2. Agent definition allows taskctl: "allow" in agent.ts:309
  3. PermissionNext.merge() at prompt.ts:818 merges agent + session permissions
  4. PermissionNext.disabled() marks taskctl as disabled
  5. resolveTools() deletes taskctl from the available tools list

The merge order is wrong - agent taskctl: "allow" should override session permission: [].

Expected behaviour

  • adversarial-pipeline should be able to call taskctl verdict to record verdicts
  • Permission system should respect agent-level tool allow rules
  • Verdicts should be recorded, allowing Pulse to transition tasks correctly

Steps to reproduce

  1. Run taskctl start 381 (or any issue)
  2. Wait for developer to complete implementation
  3. Watch adversarial-pipeline run
  4. See error: "taskctl MCP tool not available for recording verdict"
  5. Pipeline stalls, no verdict recorded

Environment

Acceptance Criteria

  • adversarial-pipeline can successfully call taskctl verdict to record APPROVED/ISSUES_FOUND verdicts
  • Permission merge order fixed: agent taskctl: "allow" overrides session permission: []
  • Test added verifying taskctl tool is available to adversarial-pipeline
  • Full pipeline run completes without "tool not available" errors

Definition of Done

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions