-
Notifications
You must be signed in to change notification settings - Fork 497
Fix #61 Continue agent execution when function calls are pending #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #61 Continue agent execution when function calls are pending #62
Conversation
|
I think this might be related to #57 |
|
Hey @meganetaaan thank you for your PR! Looking at this PR and @DroopyTersen PR (thank you for that), I think this aligns closer to the internal Python Agents SDK so I'd like to merge this. Could you please run |
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
🦋 Changeset detectedLatest commit: b53cfd9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Thanks for the feedback! I've addressed both requests:
The tests verify that text agents continue execution when tools are pending and return final output |
* Continue agent execution when function calls are pending * Add tests * Add changeset for tool execution fix 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * Fix mock object --------- Co-authored-by: Claude <[email protected]>
This fixes #61.
There is an inconsistency between the Python and TypeScript implementations of the final output logic in the agent runner. The Python version correctly checks if tools are running before treating the output as final, while the TypeScript version does not.
Python
TypeScript
The TypeScript version lacks the crucial
hasToolsOrApprovalsToRun()check, causing any text output to be treated as final even when tools are present.Fix Implemented
Added missing
hasToolsOrApprovalsToRun()method toProcessedResponseand updated final output logic:This aligns the TypeScript implementation with the Python version, allowing streams to continue after tool execution when appropriate.