Skip to content

Commit 250586a

Browse files
committed
Clarify that status_set displays immediately
- Add to tool description that status is set IMMEDIATELY - Add code comment explaining this prevents premature success status (e.g., saying 'PR checks passed' when checks are still running)
1 parent 8a35c67 commit 250586a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/services/tools/status_set.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ function isValidEmoji(str: string): boolean {
4141
/**
4242
* Status set tool factory for AI assistant
4343
* Creates a tool that allows the AI to set status indicator showing current activity
44+
*
45+
* The status is displayed IMMEDIATELY when this tool is called, even before other
46+
* tool calls complete. This prevents agents from prematurely declaring success
47+
* (e.g., "PR checks passed") when operations are still pending. Agents should only
48+
* set success status after confirming the outcome of long-running operations.
49+
*
4450
* @param config Required configuration (not used for this tool, but required by interface)
4551
*/
4652
export const createStatusSetTool: ToolFactory = () => {

src/utils/tools/toolDefinitions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ export const TOOL_DEFINITIONS = {
185185
description:
186186
"Set a status indicator to show what the agent is currently doing. " +
187187
"The emoji appears left of the streaming indicator, and the message shows on hover. " +
188+
"The status is set IMMEDIATELY when this tool is called, even before other tool calls complete. " +
188189
"IMPORTANT: Always set a status at the start of each response and update it as your work progresses. " +
189190
"The status is cleared when a new user message comes in, so you must set it again for each response. " +
190191
"Use this to communicate ongoing activities and set a final status before completing that reflects the outcome.",

0 commit comments

Comments
 (0)