Skip to content

Commit 55e65d3

Browse files
justschenCopilot
andauthored
better wording around task complete finishing (#4237)
* better wording around task complete finishing * Update src/extension/prompts/node/agent/agentPrompt.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Delete lorem.txt --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 4f99e14 commit 55e65d3

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/extension/intents/node/toolCallingLoop.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ export abstract class ToolCallingLoop<TOptions extends IToolCallingLoopOptions =
373373
'- You have open questions or ambiguities — make good decisions and keep working\n' +
374374
'- You encountered an error — try to resolve it or find an alternative approach\n' +
375375
'- There are remaining steps — complete them first\n\n' +
376+
'When you ARE done, first provide a brief text summary of what was accomplished, then call task_complete. ' +
377+
'Both the summary message and the tool call are required.\n\n' +
376378
'Keep working autonomously until the task is truly finished, then call task_complete.';
377379
}
378380

src/extension/prompts/node/agent/agentPrompt.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ export class AgentPrompt extends PromptElement<AgentPromptProps> {
118118
{!omitBaseAgentInstructions && baseAgentInstructions}
119119
{await this.getAgentCustomInstructions()}
120120
{isAutopilot && <SystemMessage priority={80}>
121-
When you have fully completed the task, call the task_complete tool to signal that you are done.
121+
When you have fully completed the task, call the task_complete tool to signal that you are done.<br />
122+
IMPORTANT: Before calling task_complete, you MUST provide a brief text summary of what was accomplished in your message. The task is not complete until both the summary and the task_complete call are present.
122123
</SystemMessage>}
123124
<UserMessage>
124125
{await this.getOrCreateGlobalAgentContext(this.props.endpoint)}

0 commit comments

Comments
 (0)