Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/tools/send-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export class SendMessageTool extends BaseDeclarativeTool<
super(
SendMessageTool.Name,
ToolDisplayNames.SEND_MESSAGE,
'Send a message to a teammate (use "to") or to a running background task (use "task_id"). ' +
'Send a message to a teammate (use "to") or to a running, paused, or completed background task (use "task_id"); completed tasks are revived. ' +
'For teams, set "to" to a bare teammate name (no @) or "*" to broadcast. ' +
'For background tasks, set "task_id" to the id from the launch response, a recovered paused task, or a completed task to revive. ' +
'Running tasks receive it at the next tool-round boundary; paused recovered tasks are resumed with the message as their first continuation instruction; a completed task is revived from its transcript and continued with your message. ' +
Expand Down
17 changes: 17 additions & 0 deletions packages/core/src/utils/environmentContext.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
import { prependToFirstTextPart } from './partUtils.js';
import type { Config } from '../config/config.js';
import type { ToolRegistry } from '../tools/tool-registry.js';
import { SendMessageTool } from '../tools/send-message.js';
import { getFolderStructure } from './getFolderStructure.js';
import { collectAvailableSkillEntries } from '../tools/skill-utils.js';
import type { AvailableSkillEntry } from '../tools/skill-utils.js';
Expand Down Expand Up @@ -519,6 +520,22 @@ describe('startup reminder builders', () => {
expect(reminder).toContain('- "cron_list": "List scheduled jobs."');
});

it('keeps completed-task revival visible in the send_message summary', () => {
const tool = new SendMessageTool({} as Config);
const reminder = buildDeferredToolsReminder(
registry({
getDeferredToolSummary: vi
.fn()
.mockReturnValue([
{ name: tool.name, description: tool.description },
]),
}),
);

expect(reminder).toContain('completed background task');
expect(reminder).toContain('completed tasks are revived');
});

it('JSON-encodes deferred tool metadata before rendering', () => {
const reminder = buildDeferredToolsReminder(
registry({
Expand Down
Loading