Skip to content

Conversation

bhouston
Copy link
Member

@bhouston bhouston commented Mar 6, 2025

Fix: Only consider response empty if no text AND no tool calls

This PR fixes an issue where the agent incorrectly identifies a response as empty when it contains tool calls but no text content. The agent was unnecessarily "scolding" the LLM in these cases, even though the LLM was functioning correctly.

Changes

  • Modified the empty response detection logic in toolAgentCore.ts to check for both the absence of text content AND the absence of tool calls before considering a response truly empty
  • Added a test to verify the fix

Testing

  • Added a unit test that verifies the condition includes both checks
  • All existing tests pass

Fixes #127

@bhouston bhouston merged commit 52b9c3a into main Mar 7, 2025
1 check passed
Copy link

🎉 This PR is included in version mycoder-agent-v1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bhouston bhouston deleted the fix/empty-response-detection-127 branch March 12, 2025 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Agent incorrectly identifies tool calls as empty responses

1 participant