fix: resolve gemini empty content error and improve max iteration fal…#887
fix: resolve gemini empty content error and improve max iteration fal…#887zilin wants to merge 2 commits intosipeed:mainfrom
Conversation
…ontent # Conflicts: # pkg/agent/loop.go
nikolasdehor
left a comment
There was a problem hiding this comment.
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.
…lback
📝 Description
🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
📚 Technical Context (Skip for Docs)
🧪 Test Environment
📸 Evidence (Optional)
Click to view Logs/Screenshots
☑️ Checklist