fix(core): remove greeting-responder example from agent tool prompt (#4923)

The greeting-responder example in the agent tool description could
mislead some models into launching a subagent for simple greetings
instead of responding with plain text. Remove the example and its
associated agent description entry to eliminate this risk.
This commit is contained in:
tanzhenxin 2026-06-10 13:55:51 +08:00 committed by GitHub
parent 35a884c004
commit 0e28eb5f48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -602,7 +602,6 @@ Example usage:
<example_agent_descriptions>
"test-runner": use this agent after you are done writing code to run tests
"greeting-responder": use this agent to respond to user greetings with a friendly joke
</example_agent_descriptions>
<example>
@ -622,14 +621,6 @@ Since a significant piece of code was written and the task was completed, now us
</commentary>
assistant: Uses the ${ToolNames.AGENT} tool to launch the test-runner agent
</example>
<example>
user: "Hello"
<commentary>
Since the user is greeting, use the greeting-responder agent to respond with a friendly joke
</commentary>
assistant: "I'm going to use the ${ToolNames.AGENT} tool to launch the greeting-responder agent"
</example>
`;
// Update description using object property assignment since it's readonly