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
| Issue exists, open PR found |**Follow-up** (Step 2B) |
30
57
| PR provided directly |**Follow-up** (Step 2B) |
31
58
32
-
## Step 2A: Initial Fix
59
+
## Step 2: Dispatch Subagents
33
60
34
-
1.`gh issue view <issue_number>`
35
-
2.`Read ppl-bugfix-harness.md`
36
-
3. Dispatch subagent:
61
+
Dispatch one subagent per reference. When there are multiple references, dispatch all subagents in a single message (parallel execution).
62
+
63
+
### 2A: Initial Fix
37
64
38
65
```
39
66
Agent(
40
-
mode: "acceptEdits",
67
+
mode: "<resolved_mode>",
41
68
isolation: "worktree",
42
69
name: "bugfix-<issue_number>",
43
70
description: "PPL bugfix #<issue_number>",
44
-
prompt: "<FULL harness content> + <issue details>
71
+
prompt: "Read .claude/harness/ppl-bugfix-harness.md and follow it to fix GitHub issue #<issue_number>.
45
72
Follow Phase 0 through Phase 3 in order.
46
73
Phase 0.3 defines TDD execution flow. Do NOT skip any phase.
47
74
Post the Decision Log (Phase 3.4) before completing."
48
75
)
49
76
```
50
77
51
-
The `isolation: "worktree"` creates a temporary git worktree branched from the current HEAD. The agent works in a clean, isolated copy of the repo — no interference with the user's working directory. If the agent makes changes, the worktree path and branch are returned in the result.
5. Report back: what was addressed, current PR state, whether another round is needed.
92
+
## Step 3: Report Back
93
+
94
+
After all subagents complete, report a summary for each:
95
+
- Classification, fix summary, PR URL, worktree path and branch, items needing human attention (2A)
96
+
- What was addressed, current PR state, whether another round is needed (2B)
90
97
91
98
## Subagent Lifecycle
92
99
@@ -106,6 +113,8 @@ Context is preserved across agents via:
106
113
107
114
## Rules
108
115
109
-
-Always inline harness content in the subagent prompt — subagents cannot read skill files
116
+
-Subagent reads `.claude/harness/ppl-bugfix-harness.md` and fetches issue/PR details itself — do NOT inline content into the prompt
110
117
- If bug is not reproducible (Phase 0.1), stop and report — do not proceed
111
118
- Issue ↔ PR auto-resolution means the user never needs to track PR numbers manually
119
+
-**Do NOT use `mode: "auto"` for subagents** — `auto` mode does not work for subagents; Bash commands still require manual approval. Only `bypassPermissions` reliably skips permission checks.
120
+
-**Always dispatch subagent** — even for trivial follow-ups (remove co-author, force push). Do NOT run commands directly in the main session; subagents with `bypassPermissions` skip permission prompts, the main session does not.
When you need to amend a commit (e.g. remove Co-Authored-By, reword message) and the branch has a merge commit on top, don't try `git reset --soft origin/main` — it will include unrelated changes if main has moved. Instead cherry-pick the fix onto latest main:
Read the issue title, description, and any reproduction steps before proceeding.
14
+
9
15
### 0.1 Reproduce the Bug
10
16
11
17
```bash
@@ -221,10 +227,8 @@ teardown:
221
227
222
228
### 3.2 Commit & Push
223
229
224
-
The subagent runs in an isolated **git worktree** branched from HEAD. All changes are on a dedicated branch that does not affect the user's working directory.
225
-
226
230
```bash
227
-
# Commit with DCO sign-off
231
+
# Commit with DCO sign-off — do NOT add Co-Authored-By lines
Runs as a **separate subagent** invocation — the original agent has completed. Invoke via `/ppl-bugfix #<issue>` or `/ppl-bugfix PR#<pr>` (auto-detects follow-up mode when a PR exists).
283
-
284
-
### 3.5.1 Reconstruct Context
285
-
286
-
The follow-up agent runs in a fresh worktree. First checkout the PR branch, then load state:
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,7 @@ plugin (OpenSearch plugin entry point, Guice DI wiring)
125
125
126
126
## Fixing PPL Bugs
127
127
128
-
Use the `/ppl-bugfix #<issue_number>` slash command to fix PPL bugs. It dispatches a subagent with scoped permissions that follows all phases in `ppl-bugfix-harness.md` — from Phase 0 (Triage & Classification) through Phase 4 (Retrospective & Improvement). The full harness content is inlined into the subagent prompt to guarantee compliance. If a user asks to fix a PPL bug without using the slash command, remind them to use `/ppl-bugfix` or invoke it on their behalf.
128
+
Use the `/ppl-bugfix #<issue_number>` slash command to fix PPL bugs. It dispatches a subagent in an isolated worktree that reads `.claude/harness/ppl-bugfix-harness.md`and follows all phases — from Phase 0 (Triage & Classification) through Phase 4 (Retrospective & Improvement). If a user asks to fix a PPL bug without using the slash command, remind them to use `/ppl-bugfix` or invoke it on their behalf.
0 commit comments