Skip to content

fix: resolve gemini empty content error and improve max iteration fal…#887

Open
zilin wants to merge 2 commits intosipeed:mainfrom
zilin:feat/gemini-empty-content
Open

fix: resolve gemini empty content error and improve max iteration fal…#887
zilin wants to merge 2 commits intosipeed:mainfrom
zilin:feat/gemini-empty-content

Conversation

@zilin
Copy link

@zilin zilin commented Feb 27, 2026

…lback

📝 Description

🗣️ Type of Change

  • [*] 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • [ *] 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

📚 Technical Context (Skip for Docs)

  • Reference URL:
  • Reasoning:

🧪 Test Environment

  • Hardware:
  • OS:
  • Model/Provider:
  • Channels:

📸 Evidence (Optional)

Click to view Logs/Screenshots

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

Copy link

@nikolasdehor nikolasdehor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has several significant issues: (1) Compilation error: The indentation and brace matching in runAgentLoop (around lines 519-534) appears broken. There is an extra } and mixed indentation that will likely cause a compile failure. Please verify the code compiles cleanly. (2) Empty PR description: Please fill in the PR template — what specific Gemini error is this fixing? (3) Silent suppression is dangerous: Setting finalContent to empty when sentUserContent is true means the agent sends nothing back to the user. If a tool sent a partial result but the LLM had more to say, the user now sees silence. (4) Session continuity broken: Skipping Sessions.AddMessage when finalContent is empty means the session history loses track of what the agent did. (5) Needs tests: This changes core agent loop behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants