You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dev-agent/qa-agent/principal-review: async subagent delegation stalls forever in CI (no notification mechanism) #210
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
fix(ci): prohibit subagent delegation — no notification mechanism in …
fix(ci): prohibit backgrounded Bash commands too, not just subagents (#…