Skip to content

Commit 2352603

Browse files
barkainclaude
andcommitted
fix(qodo): narrow Layer 3 guard trigger to continuation marker only
Qodo round 2 flagged commands/delegate.md RE-INVOCATION GUARD as too broad: the "most recent tool call was ExitPlanMode" heuristic could misroute a fresh task invocation after a prior plan-mode exit, causing it to skip Stage 0 and re-execute a stale plan. Narrowed to match the Layer 2 fix (d3d0b6a): guard now triggers only on the deterministic Stop-hook continuation marker ("PLAN ALREADY APPROVED" / "continuing to STAGE 1"). Also added explicit tool whitelist (Agent, TaskCreate/TaskUpdate/TaskGet, TeamCreate/SendMessage) for consistency with the orchestrator stub exception path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d3d0b6a commit 2352603

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

commands/delegate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ allowed-tools: Agent, Task, EnterPlanMode, ExitPlanMode, AskUserQuestion, TaskCr
66

77
## RE-INVOCATION GUARD (READ FIRST)
88

9-
Before doing ANYTHING else: if your most recent tool call in this conversation was `ExitPlanMode`, OR if you arrived here via a "PLAN ALREADY APPROVED" / "continuing to STAGE 1" continuation message, the plan is already approved. **Do NOT call `EnterPlanMode`. Do NOT re-enter Stage 0.** Skip directly to **STAGE 1: EXECUTION** — render the dependency graph from the approved plan in context and begin spawning Wave 0 agents. Re-entering plan mode here causes an infinite delegate→plan→approve loop.
9+
Before doing ANYTHING else: if you arrived here via a "PLAN ALREADY APPROVED" or "continuing to STAGE 1" continuation message from the Stop hook, the plan is already approved. **Do NOT call `EnterPlanMode`. Do NOT re-enter Stage 0.** Skip directly to **STAGE 1: EXECUTION** — render the dependency graph from the approved plan in context and begin spawning Wave 0 agents. In this path, the `Agent` tool (plus `TaskCreate`/`TaskUpdate`/`TaskGet`, and `TeamCreate`/`SendMessage` in team mode) is permitted for spawning Wave 0 phases. Re-entering plan mode here causes an infinite delegate→plan→approve loop.
1010

1111
# Workflow Orchestrator System Prompt
1212

0 commit comments

Comments
 (0)