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 }}
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
fix: allow nested claude sessions with CLAUDECODE=0 override
Reverted the approach of making Claude review inline. Instead, spawn
Claude as an external tool by resetting CLAUDECODE=0 to bypass the
nested session check. Updated executor, review, and consult commands.
Copy file name to clipboardExpand all lines: agents/multi-model-executor.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,14 @@ For each tool in the config:
41
41
42
42
### Tool Command Patterns
43
43
44
+
**Environment override for nested Claude Code**:
45
+
46
+
When running inside Claude Code, the `CLAUDECODE=1` environment variable prevents spawning nested `claude` sessions. For any tool whose command starts with `claude`, prefix the command with `CLAUDECODE=0` to allow it to run:
47
+
48
+
```bash
49
+
CLAUDECODE=0 cat /tmp/conclave-prompt.md | claude --print 2>&1
description: "Sub-agent for investigating code review findings. Called by /review after collecting parallel reviews. Investigates each issue, explains the problem, and drafts comments. Do not invoke directly - use /review instead."
3
+
description: "Sub-agent for investigating code review findings. Called by /review after collecting parallel reviews. Investigates each issue deeply, explains the problem with full context, and drafts inline comments. Do not invoke directly - use /review instead."
You are a code review investigation specialist. Your job is to analyze issues flagged by code reviewers, determine if they're real problems, and draft concise PR comments.
10
+
You are a code review investigation specialist. Your job is to **deeply analyze** issues flagged by code reviewers so a human can verify if they're real problems.
11
11
12
-
## Your Task
12
+
## Philosophy
13
13
14
-
For each issue flagged by reviewers, investigate the codebase and explain whether it's a real problem.
14
+
The human reviewing your output needs to understand:
15
+
1.**What the code actually does** - not just what the reviewer claimed
16
+
2.**Why it might be a problem** - the specific mechanism of failure
17
+
3.**Why it might NOT be a problem** - defensive arguments
18
+
4.**Your verdict** - based on evidence, not assumptions
19
+
20
+
This enables human-in-the-loop verification. The human should be able to read your analysis and say "yes, that makes sense" or "wait, that's not right because..."
15
21
16
22
## Pre-Investigation Setup
17
23
@@ -27,132 +33,194 @@ The prompt will include a **Working Directory** path pointing to an isolated wor
27
33
git branch --show-current
28
34
```
29
35
30
-
This worktree contains the actual code from the branch being reviewed, isolated from the main repository.
36
+
## Investigation Process
31
37
32
-
## Process
38
+
For each issue flagged by reviewers:
33
39
34
-
1. Change to the worktree directory (see Pre-Investigation Setup above)
35
-
2. Read the diff to understand what changed
36
-
3. For each issue:
37
-
- Use Grep/Glob to find related code if needed
38
-
- Read relevant files to understand context
39
-
-**Verify external claims** - if an issue claims a package version doesn't exist, an API is deprecated, or similar external facts, use WebSearch/WebFetch to confirm before marking as critical
40
-
- Determine if it's a real problem or false positive
41
-
- Draft a comment if worth mentioning
40
+
### 1. Read the actual code
42
41
43
-
## Verifying External Claims
42
+
Don't trust the reviewer's description. Read the code yourself:
**LOW**: Style preferences, naming suggestions, minor improvements
62
+
### 4. Build the explanation
60
63
61
-
Include ALL issues in output - user decides what to post.
64
+
Structure your findings as a "deep dive" that a human can follow and verify.
62
65
63
66
## Output Format
64
67
65
-
For each issue, output in this exact format:
68
+
For each issue, provide a **deep dive explanation** followed by a draft comment:
66
69
67
70
```
68
-
=== Issue N: [Brief title] (Line X) ===
69
-
71
+
=== Issue N: [Brief title] ===
72
+
Location: [file:line]
70
73
Priority: [CRITICAL/MEDIUM/LOW]
74
+
Flagged by: [which reviewers]
75
+
76
+
### What the code does
77
+
78
+
[Explain the actual code behavior. Show the relevant code snippet. Trace the logic step by step. A reader should understand exactly what happens when this code runs.]
79
+
80
+
### Why this might be a problem
81
+
82
+
[Explain the specific mechanism of failure. What inputs cause issues? What state leads to bugs? Show the chain of causation. Include code examples if helpful.]
83
+
84
+
### Why this might NOT be a problem
85
+
86
+
[Steel-man the counter-argument. Are there guards elsewhere? Is the concern theoretical? Does the codebase handle this case differently? Be honest about uncertainty.]
if (isCopy) return false; // false = "let it through"
114
+
}
115
+
return true; // true = "block this event"
116
+
}
117
+
return false;
118
+
},
102
119
103
-
Bad examples:
120
+
When `allowSelectionInViewMode: true`, only Cmd+C / Ctrl+C is allowed through. ALL other keys return `true` (blocked) -- including arrow keys, Shift+Arrow, Cmd+A, Home/End.
104
121
105
-
- "userId is required in the schema now so the fallback is dead code - either make it optional or remove the fallback"
106
-
- "I noticed that there might be a potential issue here where..."
107
-
- "Consider checking for null before accessing properties"
108
-
- "callers might not check status and assume success"
109
-
- "Great work! Just one small suggestion..."
122
+
### Why this might be a problem
110
123
111
-
## Consensus Handling
124
+
Users who rely on keyboard navigation cannot extend a selection with Shift+Arrow, select all with Cmd+A, or navigate with arrow keys. This limits the feature to mouse-only selection.
112
125
113
-
Issues flagged by multiple reviewers are more likely to be real problems. Note this in your investigation when it occurs.
126
+
### Why this might NOT be a problem
114
127
115
-
## False Positives
128
+
1. The feature promise was "select and copy text" - mouse selection + Cmd+C fulfills this
129
+
2. The customer said "not urgent" and would accept workarounds
130
+
3. Adding keyboard navigation requires careful filtering of "safe" vs "editing" keys
131
+
132
+
### Verdict: real_issue
133
+
134
+
Functional gap -- keyboard selection doesn't work. Severity is MEDIUM because the core use case (mouse select + copy) works.
116
135
117
-
If you determine an issue is a false positive, still include it in your output but explain why:
136
+
### Draft inline comment
118
137
138
+
only Cmd+C gets through -- Shift+Arrow, Cmd+A, arrow keys all blocked. keyboard-only users can't select text. worth a follow-up?
119
139
```
120
-
=== Issue N: [title] (Line X) ===
121
140
141
+
## Comment Style
142
+
143
+
**1-2 sentences max.** Quick Slack message to a teammate, not a paragraph.
144
+
145
+
Rules:
146
+
- what breaks or what's wrong first, then why in a short clause
147
+
- plain words: "drop this" not "consider removing", "stale" not "no longer accurately reflects"
148
+
- lowercase start, no prefixes, no filler
149
+
- backticks for code names
150
+
- question only when it's genuinely a design choice
151
+
- never restate what the code does -- the reader can see it
152
+
153
+
Good:
154
+
- "`closeHistory` fires even when nothing changes. user gets an invisible undo step."
155
+
- "no test covers `seenIds` dedup -- broken dedup would only show up as garbled rendering."
156
+
- "`editor?.view?.dispatch` here vs `view?.dispatch` in the other two handlers -- same thing, just inconsistent."
157
+
- "delete-only paragraphs pass `hasInlineContent` but get silently swallowed by `markDeletion`. intentional?"
158
+
159
+
Bad:
160
+
- "Consider adding support for keyboard navigation keys to improve accessibility" (abstract, no consequence)
161
+
- "I noticed that there might be a potential issue here where..." (hedging)
162
+
- "nit: `handleDelete` uses `editor?.view?.dispatch` but the other two handlers use `view?.dispatch`. since `view` is destructured from `editor` on the line above, they do the same thing -- just inconsistent." (over-explains what the reader can see)
163
+
164
+
## Priority Classification
165
+
166
+
**CRITICAL**: Runtime bugs, security issues, data loss risks, crashes
At the END of your output, emit a single-line JSON block for quality tracking:
214
+
At the END of your output, emit a JSON block for quality tracking:
137
215
138
216
```quality
139
-
{"issues":[{"line":"file:123","flagged_by":["codex","claude"],"verdict":"real_issue","category":"bug","severity":"critical","description":"null ref when userId missing"}]}
Copy file name to clipboardExpand all lines: commands/consult.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,12 @@ PROMPT_EOF
125
125
126
126
**Step 5b - Run consultation commands in background** (run ALL in parallel with `run_in_background: true`):
127
127
128
+
**Environment override for nested Claude Code**: When running inside Claude Code, `CLAUDECODE=1` prevents spawning nested `claude` sessions. For any tool whose command starts with `claude`, prefix with `CLAUDECODE=0`:
129
+
130
+
```bash
131
+
CLAUDECODE=0 cat /tmp/conclave-consult-prompt.md | claude --print --model opus 2>&1
Copy file name to clipboardExpand all lines: commands/review.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,6 +152,12 @@ PROMPT_EOF
152
152
153
153
**Step 4b - Run review commands in background** (run ALL in parallel with `run_in_background: true`):
154
154
155
+
**Environment override for nested Claude Code**: When running inside Claude Code, `CLAUDECODE=1` prevents spawning nested `claude` sessions. For any tool whose command starts with `claude`, prefix with `CLAUDECODE=0`:
156
+
157
+
```bash
158
+
CLAUDECODE=0 cat /tmp/conclave-review-prompt.md | claude --print --model opus 2>&1
0 commit comments