Surfaced by the live Path B test: AI fired 7 tool calls (fs.read,
fs.edit, kill, dev_server.start, curl, dev_server.logs, ...) in a single
turn, the loop exited at MAX_TOOL_ROUNDS, and the user saw only a tray
of ✓ icons — no text reply.
Two changes:
1. Bump MAX_TOOL_ROUNDS 6 → 12. Path B iteration chains routinely run
long; 6 was tuned for Path A's much-shorter Coolify-orchestration
sequences.
2. When the loop exits because of the cap (the last assistant turn was
a tool call, not a finish), force one more no-tools Gemini call
with an explicit "summarize the result, do NOT call tools" prompt.
That gives the user a sentence or two of context instead of a wall
of green checkmarks. Wrapped in try/catch so the stream still
terminates cleanly if Gemini errors.
Made-with: Cursor