Skip to content

dev-agent/qa-agent/principal-review: async subagent delegation stalls forever in CI (no notification mechanism) #210

Closed

Description

@libravault-xyz

Root cause of #207's symptom, now diagnosed

Issue #207 fixed detecting a dev-agent run that completes with no visible action. This issue is the actual root cause, found by enabling show_full_output: true and re-running against issue #96 (which hit the identical symptom as #4).

What actually happens

The agent spawns an async subagent via the Agent tool (subagent_type: "Explore") — despite Agent not being listed in --allowedTools — to delegate investigation work. This succeeds:

Async agent launched successfully. ... The agent is working in the
background. You will be notified automatically when it completes.

The agent then correctly behaves exactly like normal interactive Claude Code usage — says "Still waiting on the exploration agent's findings — I won't take further action until it reports back" and ends its turn, expecting to be re-invoked on completion.

There is no such re-invocation mechanism in a CI run. The job simply ends. The subagent's work is orphaned. Nothing the issue asked for ever happens, and the run reports outcome: success with no error.

Why --allowedTools didn't block this

This is a documented gap in the Claude Agent SDK: anthropics/claude-agent-sdk-typescript#189 — the SDK force-allows the Task/Agent tool for subagent delegation in certain contexts, overriding allowedTools/disallowedTools restrictions. Not something we can reliably fix by tightening the tool allowlist.

Fix

Added an explicit prohibition to all three workflows' prompts (dev-agent.yml, qa-agent.yml, principal-review.yml) — no subagent delegation, do all investigation directly with the agent's own Read/Grep/Glob/Bash tools within the same turn sequence, since nothing in this CI context can carry a subagent's result back to it.

Verification

Re-running issue #96 with the prompt fix in place should complete with real, direct investigation instead of stalling on an orphaned subagent.

Activity

  1. added
    bug
    on Aug 16, 2026
  2. added 2 commits that reference this issue on Aug 16, 2026
    6b1e5e8
    29ae542
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions