Commit 31dca90
committed
fix: consume ACP agent greeting on cold-start before first real prompt
When an acpx session is created or reconnected, the ACP agent (e.g.
Claude Code) emits a cold-start greeting ("The model has been set
to …") as its first response. This greeting is returned as the result
of the first real pipeline prompt, causing stage outputs like goal.md
to contain the greeting text instead of actual research content.
Add a disposable warm-up prompt ("Respond with OK") in _ensure_session()
immediately after session creation. This consumes the greeting so that
subsequent chat() calls receive genuine responses.
Reproducer:
researchclaw run --topic "..." --mode co-pilot
→ Stage 1 goal.md contains "The model has been set to … How can I
help you?" instead of a SMART research goal.1 parent 08d9d2c commit 31dca90
1 file changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
| |||
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
228 | 248 | | |
229 | 249 | | |
230 | 250 | | |
| |||
0 commit comments