Skip to content

fix(taskctl): adversarial-pipeline agent missing taskctl permission and prompt uses wrong invocation syntax #259

@randomm

Description

@randomm

Problem

Two bugs preventing adversarial-pipeline from recording verdicts:

Bug 1: Missing permission

The adversarial-pipeline agent has '*': 'deny', bash: 'allow' — the wildcard deny blocks the taskctl MCP tool. The agent literally cannot call it even if it tries correctly.

Bug 2: Wrong prompt syntax

The prompt instructs the agent to call:

taskctl verdict <taskId> --verdict APPROVED

This is CLI bash syntax. The agent should use the taskctl MCP tool with structured parameters.

Evidence

From live run: agent said 'I cannot directly call the taskctl tool — it appears to require being within the agent system context' and tried to find a binary in dist/ instead.

Fix

In packages/opencode/src/agent/agent.ts, adversarial-pipeline entry:

  1. Add taskctl to permissions:
PermissionNext.fromConfig({
  '*': 'deny',
  bash: 'allow',
  taskctl: 'allow',  // ← ADD THIS
})
  1. Fix prompt to use MCP tool syntax — replace CLI examples with MCP tool call description showing command: 'verdict', taskId, verdict, verdictSummary, verdictIssues fields.

Acceptance Criteria

  • adversarial-pipeline has taskctl: 'allow' in permissions
  • Prompt describes taskctl as an MCP tool with correct parameter names
  • End-to-end: adversarial agent successfully records verdict via taskctl tool
  • bun test and bun run typecheck pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions