Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

Handle Gemini CLI tool-loop; disable in UI

9 months ago

238d0d4
Authored
mweinbach2/8/2026, 6:43:59 PM
Add special handling for the gemini-cli provider to avoid assistant tool-call replay loops: sanitize assistant messages to strip tool-call parts, run the provider in a single-step tool-loop, and unify finish-reason extraction. Add defaults to keep Gemini thought parts off by default (thinkingConfig.includeThoughts=false, thinkingLevel=minimal) and wire these settings into getModel/DEFAULT_PROVIDER_OPTIONS. Remove gemini-cli from interactive provider/connect lists in both CLI and TUI (showing a temporary disabled message) and guard UI actions against selecting it. Update tests to cover the Gemini behavior and provider defaults. Files changed: src/agent.ts, src/cli/repl.ts, src/config.ts, src/index.ts, src/tui/index.tsx, test/agent.test.ts, test/providers.test.ts.

Parenta383860

7 files changed
  • src/agent.ts+73−0
  • src/cli/repl.ts+19−6
  • src/config.ts+43−1
  • src/index.ts+7−0
  • src/tui/index.tsx+23−5
  • test/agent.test.ts+60−0
  • test/providers.test.ts+40−3