fix: resolve inability to call shutdown_response tool (S11)#178
Open
kawasaki12138 wants to merge 1 commit intoshareAI-lab:mainfrom
Open
fix: resolve inability to call shutdown_response tool (S11)#178kawasaki12138 wants to merge 1 commit intoshareAI-lab:mainfrom
kawasaki12138 wants to merge 1 commit intoshareAI-lab:mainfrom
Conversation
fix: allow agents to autonomously respond to shutdown requests (S11) Previously, autonomous agents in the IDLE phase would hard-kill themselves (via an immediate return) upon receiving a `shutdown_request` message. This bypassed the agent's LLM completely, preventing it from using the `shutdown_response` tool to formally approve or reject the request. This commit fixes the issue by: 1. Removing the early return in the inbox polling loop so the `shutdown_request` message is correctly appended to the agent's context and wakes it up. 2. Updating the `shutdown_response` tool handler to mark the agent's status as "shutdown" if `approve` is True. 3. Breaking the agent's main loop if `shutdown_response` is called and approved, allowing the thread to terminate gracefully. This restores the intended collaborative negotiation mechanism between the Lead and Teammate agents.
|
@kawasaki12138 is attempting to deploy a commit to the crazyboym's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: resolve inability to call shutdown_response tool (S11)
Previously, autonomous agents in the IDLE phase would hard-kill themselves (via an immediate return) upon receiving a
shutdown_requestmessage. This bypassed the agent's LLM completely, preventing it from using theshutdown_responsetool to formally approve or reject the request.This commit fixes the issue by:
shutdown_requestmessage is correctly appended to the agent's context and wakes it up.shutdown_responsetool handler to mark the agent's status as "shutdown" ifapproveis True.shutdown_responseis called and approved, allowing the thread to terminate gracefully.This restores the intended collaborative negotiation mechanism between the Lead and Teammate agents.