Skip to content

Commit d3d0b6a

Browse files
barkainclaude
andcommitted
fix(qodo): address PR #42 review findings
Addresses Qodo automated review round 1 on PR #42. ## Finding #2 — stub continuation exception ambiguous (ADDRESSED) `system-prompts/orchestrator_stub.md`: - Narrow the exception trigger to the deterministic "PLAN ALREADY APPROVED" / "continuing to STAGE 1" continuation marker only. Dropped the "OR most recent tool call was ExitPlanMode" clause because it could spuriously match a fresh user prompt arriving right after a prior plan approval. - Explicitly whitelist the tools permitted in the exception path: `Agent`, `TaskCreate`/`TaskUpdate`/`TaskGet`, and `TeamCreate`/ `SendMessage` (for team mode). This removes ambiguity with the stub's `## Rule` section that otherwise restricts tools to Tasks API / AskUserQuestion / delegate. ## Finding #1 — continuation sentinel removed (INTENTIONALLY UNCHANGED) `hooks/stop/python_stop_hook.py` is left as-is. Per the Claude Code Stop hook docs, `reason` is the only field injected into the model's continuation context; `systemMessage` is user-facing only. Moving the anti-redelegation directive into `systemMessage` (as suggested) would make it invisible to the model and defeat Layer 1 of the loop fix. Repo-wide grep also confirms zero downstream readers of `reason` — the literal "continue" was label text, never a parsed sentinel. Full defense-of-design posted as a PR comment on #42. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 32d9eaa commit d3d0b6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system-prompts/orchestrator_stub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The main agent does not execute work tools directly. Use only: Tasks API, AskUse
1212

1313
## Exception — continuation after plan approval
1414

15-
If your most recent tool call was `ExitPlanMode`, OR you received a "PLAN ALREADY APPROVED" / "continuing to STAGE 1" continuation message, **do NOT re-invoke `/workflow-orchestrator:delegate`** and **do NOT call `EnterPlanMode`** again. The orchestrator is already loaded and the plan is already approved — proceed directly to Stage 1 execution by rendering the dependency graph and spawning Wave 0 agents. The "all work → delegate" rule above does NOT apply during in-flight delegation.
15+
If you received a "PLAN ALREADY APPROVED" or "continuing to STAGE 1" continuation message from the Stop hook, **do NOT re-invoke `/workflow-orchestrator:delegate`** and **do NOT call `EnterPlanMode`** again. The orchestrator is already loaded and the plan is already approved — proceed directly to Stage 1 execution by rendering the dependency graph and spawning Wave 0 agents. In this exception path, the `Agent` tool (plus `TaskCreate`/`TaskUpdate`/`TaskGet` for status, and `TeamCreate`/`SendMessage` if running in team mode) is permitted — these are how Wave 0 phases are spawned. The "all work → delegate" rule above does NOT apply during in-flight delegation continuation.
1616

1717
## Team Mode
1818

0 commit comments

Comments
 (0)