Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Commit 714a28e

Browse files
committed
feat: use ollama launch claude for agentic cloud models
Cloud models now use `ollama launch claude -- --print` instead of `ollama run`, enabling tools, web search, and subagents. Updated model versions to latest (minimax-m2.5, glm-5, kimi-k2.5). Synced sample review prompt with improved comment style and output format.
1 parent 14bbee5 commit 714a28e

8 files changed

Lines changed: 145 additions & 66 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ Review results are saved as JSON files containing raw model outputs, timestamps,
125125
| Qwen | `coder-model` (default), `vision-model` | [Qwen Code Docs](https://qwenlm.github.io/qwen-code-docs/) |
126126
| Mistral | Config-based (`~/.vibe/config.toml`) | [Mistral Vibe Docs](https://docs.mistral.ai/mistral-vibe/) |
127127
| Grok | `grok-code-fast-1`, `grok-4-1-fast-*`, `grok-4-fast-*`, `grok-3`, `grok-3-mini` | [xAI API Models](https://docs.x.ai/docs/models) |
128-
| Ollama | `qwen3-coder:480b-cloud`, `devstral-2:123b-cloud`, or any model from library | [Ollama Library](https://ollama.com/library) |
128+
| Ollama | Cloud (recommended): `minimax-m2.5:cloud`, `glm-5:cloud`, `kimi-k2.5:cloud`, or any model from library | [Ollama Library](https://ollama.com/library) |
129129

130-
> **Note:** Ollama cloud models use `:cloud` suffix and require `OLLAMA_API_KEY` environment variable. Get your API key at [ollama.com](https://ollama.com). You can also run local models (e.g., `qwen2.5-coder:7b`), but they are slow and require significant memory (~8GB+ RAM for 7B models).
130+
> **Note:** Ollama cloud models (`:cloud` suffix) run via `ollama launch claude` with full agentic capabilities — tools, web search, and subagents. Requires `OLLAMA_API_KEY`. Get your API key at [ollama.com](https://ollama.com). Local models (e.g., `qwen2.5-coder:7b`) use `ollama run` (text-only), are slower, and require significant memory (~8GB+ RAM for 7B models).
131131
132132
> **Note:** Mistral and Grok use command-line argument passing (not stdin), which has a ~200KB limit on macOS. Very large diffs may cause these tools to fail while other tools succeed.
133133
@@ -152,7 +152,7 @@ Customize prompts for each command:
152152
| Qwen | `npm install -g @qwen-code/qwen-code` |
153153
| Mistral | `pipx install mistral-vibe` |
154154
| Grok | `bun add -g @vibe-kit/grok-cli`; `export GROK_API_KEY="key"` in `~/.zshrc` |
155-
| Ollama | [ollama.com/download](https://ollama.com/download); cloud: `export OLLAMA_API_KEY="key"` in `~/.zshrc`; local: `ollama pull <model>` |
155+
| Ollama | [ollama.com/download](https://ollama.com/download); cloud (agentic): `export OLLAMA_API_KEY="key"` in `~/.zshrc`; local: `ollama pull <model>` |
156156

157157
## Usage
158158

agents/multi-model-executor.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@ For each tool in the config:
4343

4444
**Environment override for nested Claude Code**:
4545

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:
46+
When running inside Claude Code, `CLAUDECODE=1` prevents spawning nested sessions. Prefix with `CLAUDECODE=0` for any tool whose command starts with `claude` or uses `ollama launch claude`:
4747

4848
```bash
49-
CLAUDECODE=0 cat /tmp/conclave-prompt.md | claude --print 2>&1
49+
# Claude tools
50+
cat /tmp/conclave-prompt.md | CLAUDECODE=0 claude --print 2>&1
51+
52+
# Ollama cloud tools (ollama launch claude wraps Claude Code)
53+
cat /tmp/conclave-prompt.md | CLAUDECODE=0 ollama launch claude --model minimax-m2.5:cloud -- --print 2>&1
5054
```
5155

5256
**Stdin-based tools** (most):
@@ -70,11 +74,28 @@ If a tool has a `model` field, inject it:
7074
| gemini | `-m` | Appended |
7175
| qwen | `-m` | Appended |
7276
| mistral | N/A | Config-based |
73-
| ollama | N/A | Appended directly (no flag)|
77+
| ollama | varies | See Ollama section below |
7478
| grok | `-m` | Appended |
7579

7680
Skip injection if command already contains a model flag.
7781

82+
### Ollama Command Pattern
83+
84+
Ollama has two command patterns depending on model type:
85+
86+
**Cloud models** (`:cloud` suffix) — use `ollama launch claude` (agentic, with tools/web search):
87+
- Command: `ollama launch claude -- --print`
88+
- Model injection: `--model` flag inserted before `--`
89+
- Requires `CLAUDECODE=0` prefix
90+
- Example: `cat /tmp/conclave-prompt.md | CLAUDECODE=0 ollama launch claude --model qwen3-coder:480b-cloud -- --print 2>&1`
91+
92+
**Local models** (no `:cloud` suffix) — use `ollama run` (text-only):
93+
- Command: `ollama run`
94+
- Model injection: Appended directly (no flag)
95+
- Example: `cat /tmp/conclave-prompt.md | ollama run qwen2.5-coder:7b 2>&1`
96+
97+
Detection: If the tool's `model` field ends with `:cloud`, use the cloud pattern.
98+
7899
### Step 3: Collect Results
79100

80101
Use TaskOutput for each background task to wait for completion.

commands/consult.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,14 @@ PROMPT_EOF
125125

126126
**Step 5b - Run consultation commands in background** (run ALL in parallel with `run_in_background: true`):
127127

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`:
128+
**Environment override for nested Claude Code**: When running inside Claude Code, `CLAUDECODE=1` prevents spawning nested sessions. Prefix with `CLAUDECODE=0` for any tool whose command starts with `claude` or uses `ollama launch claude`:
129129

130130
```bash
131-
CLAUDECODE=0 cat /tmp/conclave-consult-prompt.md | claude --print --model opus 2>&1
131+
# Claude tools
132+
cat /tmp/conclave-consult-prompt.md | CLAUDECODE=0 claude --print --model opus 2>&1
133+
134+
# Ollama cloud tools
135+
cat /tmp/conclave-consult-prompt.md | CLAUDECODE=0 ollama launch claude --model minimax-m2.5:cloud -- --print 2>&1
132136
```
133137

134138
For stdin-based tools:
@@ -239,7 +243,8 @@ Same as `/review` - see `~/.config/conclave/tools.json` for enabled tools.
239243
| Qwen | `qwen -o text` | `-m` (append) |
240244
| Mistral | `vibe --output text -p` | Config-based |
241245
| Grok | `grok -p` | `-m` (append) |
242-
| Ollama | `ollama run` | Appended directly |
246+
| Ollama (local) | `ollama run` | Appended directly |
247+
| Ollama (cloud) | `ollama launch claude -- --print` | `--model` (before `--`) |
243248

244249
## Error Handling
245250

commands/review.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,14 @@ PROMPT_EOF
152152

153153
**Step 4b - Run review commands in background** (run ALL in parallel with `run_in_background: true`):
154154

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`:
155+
**Environment override for nested Claude Code**: When running inside Claude Code, `CLAUDECODE=1` prevents spawning nested sessions. Prefix with `CLAUDECODE=0` for any tool whose command starts with `claude` or uses `ollama launch claude`:
156156

157157
```bash
158-
CLAUDECODE=0 cat /tmp/conclave-review-prompt.md | claude --print --model opus 2>&1
158+
# Claude tools
159+
cat /tmp/conclave-review-prompt.md | CLAUDECODE=0 claude --print --model opus 2>&1
160+
161+
# Ollama cloud tools
162+
cat /tmp/conclave-review-prompt.md | CLAUDECODE=0 ollama launch claude --model minimax-m2.5:cloud -- --print 2>&1
159163
```
160164

161165
For most tools (stdin-based):
@@ -177,7 +181,7 @@ For Mistral Vibe and Grok (command substitution - do not accept stdin):
177181
| gemini | `-m` | Appended to command |
178182
| qwen | `-m` | Appended to command |
179183
| mistral | N/A | Model set via `~/.vibe/config.toml` |
180-
| ollama | N/A | Appended directly (no flag) |
184+
| ollama | varies | See Ollama examples below |
181185
| grok | `-m` | Appended to command |
182186

183187
**Notes**:
@@ -214,9 +218,14 @@ Original: grok -p
214218
With model: grok -p -m grok-code-fast-1
215219
grok -p -m grok-code-fast-1 "$(cat /tmp/conclave-review-prompt.md)"
216220
217-
# Ollama (model appended directly, no flag)
221+
# Ollama local (model appended directly, no flag)
218222
Original: ollama run
219223
With model: ollama run qwen2.5-coder:7b
224+
225+
# Ollama cloud (--model flag before --, requires CLAUDECODE=0)
226+
Original: ollama launch claude -- --print
227+
With model: ollama launch claude --model qwen3-coder:480b-cloud -- --print
228+
Final: cat /tmp/prompt.md | CLAUDECODE=0 ollama launch claude --model qwen3-coder:480b-cloud -- --print 2>&1
220229
```
221230

222231
Use `timeout: 300000` (5 minutes) for each command since AI tools can be slow.
@@ -643,13 +652,15 @@ Most tools receive the prompt via stdin: `cat prompt.md | {command}`
643652
| Qwen | `qwen -o text` | `-m` (append) | Reads prompt from stdin, `-o text` for plain output |
644653
| Mistral | `vibe --output text -p` | Config-based | Uses command substitution: `vibe --output text -p "$(cat file)"` |
645654
| Grok | `grok -p` | `-m` (append) | Uses command substitution: `grok -p -m model "$(cat file)"` |
646-
| Ollama | `ollama run` | Appended directly | Model appended without flag: `ollama run <model>` |
655+
| Ollama (local) | `ollama run` | Appended directly | Model appended without flag: `ollama run <model>` |
656+
| Ollama (cloud) | `ollama launch claude -- --print` | `--model` (before `--`) | Agentic mode with tools/web search. Requires `CLAUDECODE=0` |
647657

648658
**Notes**:
649659
- All tools read from the same prompt file (`/tmp/conclave-review-prompt.md`) written once in Step 4a.
650660
- Mistral Vibe does not accept stdin; prompt must be passed via `-p` flag using command substitution.
651661
- Mistral model selection is done via `~/.vibe/config.toml` (`active_model` setting), not CLI flags.
652662
- Grok CLI does not accept stdin; prompt must be passed via `-p` flag using command substitution (like Mistral).
663+
- Ollama cloud models (`:cloud` suffix) use `ollama launch claude` which runs a full agentic session. The model gets access to file read, grep, bash, web search, and subagents.
653664
- **Limitation**: Mistral and Grok's command-line argument passing has a ~200KB limit (ARG_MAX). Very large diffs may fail.
654665

655666
---

config/prompt.example.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,42 @@ When reviewing the diff:
1414
2. **Consider readability** - Is the code clear and maintainable? Does it follow best practices?
1515
3. **Evaluate performance** - Are there obvious performance concerns or optimizations?
1616
4. **Assess test coverage** - Are there adequate tests for these changes?
17-
5. **Ask clarifying questions** - Ask for clarification if unsure about the changes.
18-
6. **Don't be overly pedantic** - Nitpicks are fine, but only if relevant.
17+
5. **Don't be overly pedantic** - Nitpicks are fine, but only if relevant.
1918

20-
In your output:
19+
## Comment Style
2120

22-
- Provide a summary overview of the general code quality.
23-
- Present issues in a table with columns: index, line number(s), code, issue, and potential solution(s).
24-
- If no issues are found, briefly state that the code meets best practices.
21+
Write each finding as a short comment (1-3 sentences). Think teammate leaving a quick note, not writing a paper.
22+
23+
**Rules**:
24+
- Concrete consequence first, then the technical detail
25+
- End with a question when it's a design decision
26+
- Lowercase start, no prefixes like "nit:" or "suggestion:"
27+
- Use simple words -- say "pick one place" not "canonicalize", "cut in half" not "halve", "differs from" not "diverges from"
28+
- Don't hedge ("I think maybe this could potentially...") -- just say what the issue is
29+
- Don't over-explain -- if the code is right there, trust the reader to follow
30+
- Skip pleasantries and filler
31+
32+
## Output Format
33+
34+
Start with a 2-3 sentence summary of overall code quality.
35+
36+
Then list each finding:
37+
38+
```
39+
**<file>:<lines>** -- <short title>
40+
41+
<1-3 sentence comment>
42+
```
43+
44+
End with a summary table:
45+
46+
```
47+
| Finding | Severity | Action |
48+
|---------|----------|--------|
49+
| <short title> | Low/Medium/High | <what to do> |
50+
```
51+
52+
If no issues are found, briefly state that the code looks good.
2553

2654
## Full Diff
2755

config/tools.example.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -51,68 +51,68 @@
5151
"model": "grok-code-fast-1",
5252
"description": "xAI Grok CLI (community)"
5353
},
54-
"ollama-qwen": {
54+
"ollama-minimax": {
5555
"enabled": false,
5656
"scope": ["review", "consult"],
57-
"command": "ollama run",
58-
"model": "qwen3-coder:480b-cloud",
59-
"description": "Ollama (Qwen3 Coder 480B)"
57+
"command": "ollama launch claude -- --print",
58+
"model": "minimax-m2.5:cloud",
59+
"description": "Ollama (MiniMax M2.5, agentic)"
6060
},
61-
"ollama-devstral": {
61+
"ollama-glm": {
6262
"enabled": false,
6363
"scope": ["review", "consult"],
64-
"command": "ollama run",
65-
"model": "devstral-2:123b-cloud",
66-
"description": "Ollama (Devstral 2 123B)"
64+
"command": "ollama launch claude -- --print",
65+
"model": "glm-5:cloud",
66+
"description": "Ollama (GLM-5, agentic)"
6767
},
68-
"ollama-local": {
68+
"ollama-kimi": {
6969
"enabled": false,
70-
"scope": ["review"],
71-
"command": "ollama run",
72-
"model": "qwen2.5-coder:7b",
73-
"description": "Ollama (Qwen 2.5 Coder 7B, local)"
70+
"scope": ["review", "consult"],
71+
"command": "ollama launch claude -- --print",
72+
"model": "kimi-k2.5:cloud",
73+
"description": "Ollama (Kimi K2.5, agentic)"
7474
},
75-
"ollama-kimi": {
75+
"ollama-qwen": {
7676
"enabled": false,
7777
"scope": ["review", "consult"],
78-
"command": "ollama run",
79-
"model": "kimi-k2:1t-cloud",
80-
"description": "Ollama (Kimi K2 1T)"
78+
"command": "ollama launch claude -- --print",
79+
"model": "qwen3-coder:480b-cloud",
80+
"description": "Ollama (Qwen3 Coder 480B, agentic)"
8181
},
82-
"ollama-glm": {
82+
"ollama-devstral": {
8383
"enabled": false,
8484
"scope": ["review", "consult"],
85-
"command": "ollama run",
86-
"model": "glm-4.7:cloud",
87-
"description": "Ollama (GLM-4.7)"
85+
"command": "ollama launch claude -- --print",
86+
"model": "devstral-2:123b-cloud",
87+
"description": "Ollama (Devstral 2 123B, agentic)"
8888
},
8989
"ollama-deepseek": {
9090
"enabled": false,
9191
"scope": ["review", "consult"],
92-
"command": "ollama run",
92+
"command": "ollama launch claude -- --print",
9393
"model": "deepseek-v3.2:cloud",
94-
"description": "Ollama (DeepSeek V3.2)"
94+
"description": "Ollama (DeepSeek V3.2, agentic)"
9595
},
9696
"ollama-rnj": {
9797
"enabled": false,
9898
"scope": ["review", "consult"],
99-
"command": "ollama run",
99+
"command": "ollama launch claude -- --print",
100100
"model": "rnj-1:8b-cloud",
101-
"description": "Ollama (RNJ-1 8B, code/STEM optimized)"
101+
"description": "Ollama (RNJ-1 8B, agentic)"
102102
},
103103
"ollama-devstral-small": {
104104
"enabled": false,
105105
"scope": ["review", "consult"],
106-
"command": "ollama run",
106+
"command": "ollama launch claude -- --print",
107107
"model": "devstral-small-2:24b-cloud",
108-
"description": "Ollama (Devstral Small 2 24B, vision+tools)"
108+
"description": "Ollama (Devstral Small 2 24B, agentic)"
109109
},
110-
"ollama-minimax": {
110+
"ollama-local": {
111111
"enabled": false,
112-
"scope": ["review", "consult"],
112+
"scope": ["review"],
113113
"command": "ollama run",
114-
"model": "minimax-m2:cloud",
115-
"description": "Ollama (MiniMax M2, coding/agentic)"
114+
"model": "qwen2.5-coder:7b",
115+
"description": "Ollama (Qwen 2.5 Coder 7B, local)"
116116
}
117117
},
118118
"prompts": {

tests/cli-live.sh

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# WARNING: This runs real API calls and incurs costs.
66
# Only run when you need to verify tools are working end-to-end.
77
#
8-
# NOTE: Ollama cloud models require OLLAMA_API_KEY environment variable.
8+
# NOTE: Ollama cloud models require OLLAMA_API_KEY and use `ollama launch claude` (agentic mode).
99
# NOTE: Grok requires GROK_API_KEY environment variable.
1010

1111
set -eo pipefail
@@ -46,10 +46,13 @@ test_tool() {
4646
return 2
4747
fi
4848

49+
# Build env prefix (e.g., CLAUDECODE=0 for nested Claude Code sessions)
50+
local env_prefix="${4:-}"
51+
4952
if [ "$use_stdin" = "true" ]; then
50-
result=$(echo "$PROMPT" | $timeout_cmd $TIMEOUT $cmd 2>&1)
53+
result=$(echo "$PROMPT" | $env_prefix $timeout_cmd $TIMEOUT $cmd 2>&1)
5154
else
52-
result=$($timeout_cmd $TIMEOUT $cmd "$PROMPT" 2>&1)
55+
result=$($env_prefix $timeout_cmd $TIMEOUT $cmd "$PROMPT" 2>&1)
5356
fi
5457

5558
exit_code=$?
@@ -97,11 +100,15 @@ else
97100
echo " ○ grok skipped (GROK_API_KEY not set)"
98101
((skipped++))
99102
fi
100-
# Skip ollama cloud models if API key not set
101-
if [[ "$MODEL_OLLAMA" == *"-cloud"* ]] && [[ -z "$OLLAMA_API_KEY" ]]; then
102-
echo "Testing ollama..."
103-
echo " ○ ollama skipped (cloud model requires OLLAMA_API_KEY)"
104-
((skipped++))
103+
# Ollama: cloud models use `ollama launch claude` (agentic), local uses `ollama run`
104+
if [[ "$MODEL_OLLAMA" == *":cloud"* ]]; then
105+
if [[ -z "$OLLAMA_API_KEY" ]]; then
106+
echo "Testing ollama..."
107+
echo " ○ ollama skipped (cloud model requires OLLAMA_API_KEY)"
108+
((skipped++))
109+
else
110+
test_tool "ollama" "ollama launch claude --model $MODEL_OLLAMA -- --print" true "CLAUDECODE=0"
111+
fi
105112
else
106113
test_tool "ollama" "ollama run $MODEL_OLLAMA" true
107114
fi

tests/cli-models.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# WARNING: This runs many API calls (one per model) and incurs significant costs.
66
# Only run when validating README model documentation is accurate.
77
#
8-
# NOTE: Ollama cloud models (`:cloud` suffix) require OLLAMA_API_KEY environment variable.
8+
# NOTE: Ollama cloud models (`:cloud` suffix) require OLLAMA_API_KEY environment variable
9+
# and use `ollama launch claude` (agentic mode with tools/web search).
910
# Get your API key at https://ollama.com
1011
#
1112
# NOTE: Grok models require GROK_API_KEY environment variable.
@@ -48,10 +49,13 @@ test_model() {
4849
return 2
4950
fi
5051

52+
# Build env prefix (e.g., CLAUDECODE=0 for nested Claude Code sessions)
53+
local env_prefix="${5:-}"
54+
5155
if [ "$use_stdin" = "true" ]; then
52-
result=$(echo "$PROMPT" | $timeout_cmd $TIMEOUT $cmd 2>&1)
56+
result=$(echo "$PROMPT" | $env_prefix $timeout_cmd $TIMEOUT $cmd 2>&1)
5357
else
54-
result=$($timeout_cmd $TIMEOUT $cmd "$PROMPT" 2>&1)
58+
result=$($env_prefix $timeout_cmd $TIMEOUT $cmd "$PROMPT" 2>&1)
5559
fi
5660

5761
exit_code=$?
@@ -137,15 +141,18 @@ fi
137141
echo ""
138142

139143
# Ollama models
140-
# Cloud models require OLLAMA_API_KEY, local models must be pulled first
144+
# Cloud models use `ollama launch claude` (agentic), local models use `ollama run`
141145
echo "--- Ollama ---"
142146
if [[ -n "$OLLAMA_API_KEY" ]]; then
143-
test_model "ollama" "qwen3-coder:480b-cloud" "ollama run qwen3-coder:480b-cloud" true
144-
test_model "ollama" "devstral-2:123b-cloud" "ollama run devstral-2:123b-cloud" true
147+
# Recommended cloud models (agentic via ollama launch claude)
148+
test_model "ollama" "minimax-m2.5:cloud" "ollama launch claude --model minimax-m2.5:cloud -- --print" true "CLAUDECODE=0"
149+
test_model "ollama" "glm-5:cloud" "ollama launch claude --model glm-5:cloud -- --print" true "CLAUDECODE=0"
150+
test_model "ollama" "kimi-k2.5:cloud" "ollama launch claude --model kimi-k2.5:cloud -- --print" true "CLAUDECODE=0"
145151
else
146152
echo " ○ cloud models skipped (OLLAMA_API_KEY not set)"
147-
((skipped+=2))
153+
((skipped+=3))
148154
fi
155+
# Local model (text-only via ollama run)
149156
test_model "ollama" "qwen2.5-coder:7b" "ollama run qwen2.5-coder:7b" true
150157
echo ""
151158

0 commit comments

Comments
 (0)