From 0963a0f4d07cbeb873d48fc41d1125ba1afa6857 Mon Sep 17 00:00:00 2001 From: LibraVault Date: Sun, 16 Aug 2026 11:05:37 +0000 Subject: [PATCH] fix(ci): prohibit backgrounded Bash commands too, not just subagents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Live-tested via the Phase 5 pilot: PR #213's QA run hit the identical underlying failure as #210 (agent waits for a completion notification that doesn't exist in CI), but via a different mechanism — Bash with run_in_background: true to launch the test suite asynchronously, then 'I'll stop polling now and wait for the actual background-task notification when the full test suite finishes.' 31 turns, $0.80 spent, no verdict produced — same failure mode, different tool. #211's fix only prohibited subagent delegation (the Agent tool). Broadened the same prompt guidance in all three workflows to cover any mechanism that depends on a later notification: no subagent delegation AND no backgrounded Bash commands waited on asynchronously. Every command — including the QA persona's own core job, running the test suite — must run in the foreground and be waited on synchronously, however long it takes. --- .github/workflows/dev-agent.yml | 24 +++++++++++++++--------- .github/workflows/principal-review.yml | 21 +++++++++++++-------- .github/workflows/qa-agent.yml | 23 +++++++++++++++-------- 3 files changed, 43 insertions(+), 25 deletions(-) diff --git a/.github/workflows/dev-agent.yml b/.github/workflows/dev-agent.yml index 7de0656b..b941049e 100644 --- a/.github/workflows/dev-agent.yml +++ b/.github/workflows/dev-agent.yml @@ -322,15 +322,21 @@ jobs: and CI-passing (or you've explained why it isn't) before you finish. - Do not delegate any part of this task to a subagent (the Agent - tool, any "Explore"/"Task" subagent type, or anything that - reports back asynchronously) — there is no notification - mechanism in this CI run for a subagent's result to reach you. - If you do, your run will simply end while "waiting," the - subagent's work is discarded, and nothing you were asked to do - actually happens. Investigate and implement everything - yourself, directly, with your own Read/Grep/Glob/Bash/Edit/Write - calls in this same turn sequence. + Do not use anything that depends on a completion notification + arriving later — there is no such mechanism in this CI run, so + it never arrives and your work is simply abandoned: + - No subagent delegation (the Agent tool, any "Explore"/"Task" + subagent type). + - No backgrounded Bash commands (run_in_background) that you + then wait to be notified about — including long ones like + the test suite. Run every command in the foreground and wait + for its real output before continuing, even if it takes + several minutes; that's normal and expected here, not a + problem to work around. + Investigate and implement everything yourself, directly, with + your own Read/Grep/Glob/Bash/Edit/Write calls in this same + turn sequence, waiting synchronously for each one's actual + result before moving on. ${{ steps.guard.outputs.mode == 'revise' && format('You are being RE-INVOKED: QA sent PR #{0} back with status:in-progress against issue #{1}. Read the persona''s "When QA sends work back" section. The PR''s branch is already checked out in the working directory — read the QA agent''s latest PR comment for the specific gaps it found, and fix only those. Do not rescope the whole change and do not open a new PR; push commits to this same branch.', steps.guard.outputs.pr_number, steps.guard.outputs.issue_number) || format('Triage and, if scoped confidently, implement issue #{0} in this repository (use `gh issue view` to read it).', steps.guard.outputs.issue_number) }} diff --git a/.github/workflows/principal-review.yml b/.github/workflows/principal-review.yml index 7a80722e..ebcb11c7 100644 --- a/.github/workflows/principal-review.yml +++ b/.github/workflows/principal-review.yml @@ -185,14 +185,19 @@ jobs: yourself — the workflow applies whichever one matches your verdict, based on the verdict file you write below. - Do not delegate any part of this review to a subagent (the - Agent tool, any "Explore"/"Task" subagent type, or anything - that reports back asynchronously) — there is no notification - mechanism in this CI run for a subagent's result to reach you. - If you do, your run will simply end while "waiting," and no - verdict ever gets produced. Investigate everything yourself, - directly, with your own Read/Grep/Glob/Bash calls in this same - turn sequence. + Do not use anything that depends on a completion notification + arriving later — there is no such mechanism in this CI run, so + it never arrives and no verdict ever gets produced: + - No subagent delegation (the Agent tool, any "Explore"/"Task" + subagent type). + - No backgrounded Bash commands (run_in_background) that you + then wait to be notified about. Run every command in the + foreground and wait for its real output before continuing, + even if it takes several minutes; that's normal and expected + here, not a problem to work around. + Investigate everything yourself, directly, with your own + Read/Grep/Glob/Bash calls in this same turn sequence, waiting + synchronously for each one's actual result before moving on. As your very last action, write a single line to the file `principal-verdict.txt` in the repo root: exactly one of diff --git a/.github/workflows/qa-agent.yml b/.github/workflows/qa-agent.yml index 552cac58..8e53a89d 100644 --- a/.github/workflows/qa-agent.yml +++ b/.github/workflows/qa-agent.yml @@ -178,14 +178,21 @@ jobs: deterministically from label history and applies whichever label matches your verdict. - Do not delegate any part of this task to a subagent (the Agent - tool, any "Explore"/"Task" subagent type, or anything that - reports back asynchronously) — there is no notification - mechanism in this CI run for a subagent's result to reach you. - If you do, your run will simply end while "waiting," and no - verdict ever gets produced. Investigate everything yourself, - directly, with your own Read/Grep/Glob/Bash calls in this same - turn sequence. + Do not use anything that depends on a completion notification + arriving later — there is no such mechanism in this CI run, so + it never arrives and no verdict ever gets produced: + - No subagent delegation (the Agent tool, any "Explore"/"Task" + subagent type). + - No backgrounded Bash commands (run_in_background) that you + then wait to be notified about — including the test suite, + which is exactly this persona's core job. Run every command, + including `./gradlew testDebugUnitTest`, in the foreground + and wait for its real output before continuing, even if it + takes several minutes; that's normal and expected here, not + a problem to work around. + Investigate everything yourself, directly, with your own + Read/Grep/Glob/Bash calls in this same turn sequence, waiting + synchronously for each one's actual result before moving on. The persona's "Reporting is mandatory" section is not optional framing — read it first and budget your turns to it