Skip to content

fix: resolve inability to call shutdown_response tool (S11)#178

Open
kawasaki12138 wants to merge 1 commit intoshareAI-lab:mainfrom
kawasaki12138:main
Open

fix: resolve inability to call shutdown_response tool (S11)#178
kawasaki12138 wants to merge 1 commit intoshareAI-lab:mainfrom
kawasaki12138:main

Conversation

@kawasaki12138
Copy link
Copy Markdown

@kawasaki12138 kawasaki12138 commented Apr 4, 2026

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_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.

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.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 4, 2026

@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.

@kawasaki12138 kawasaki12138 changed the title Update s11_autonomous_agents.py fix: resolve inability to call shutdown_response tool (S11) Apr 4, 2026
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.

1 participant