You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(core): generalize task_stop and send_message framing to "task"
Today every BackgroundTaskRegistry entry is a subagent, but the
control-plane tools were named and described as agent-only. Generalize
so future task kinds (e.g. backgrounded shells, monitors) can share
the same registry without a model-facing rename.
- task_stop / send_message: descriptions, error messages, and ToolError
enum values drop the "agent" framing in favor of "task".
- send_message: parameter to -> task_id, matching task_stop for a
uniform control-plane contract.
- BackgroundTaskRegistry.hasUnfinalizedAgents -> hasUnfinalizedTasks.
- agent-transcript: add a TODO at getSubagentSessionDir flagging that
<projectDir>/subagents/ is part of the model-facing contract via
<output-file>; future kinds should migrate to <projectDir>/tasks/.
- Add a test for complete()-after-finalizeCancelled no-op to pin the
one-notification-per-task SDK contract through the post-notified
re-entry path.
llmContent: `Message queued for delivery to background agent "${this.params.to}". The agent will receive it at the next tool-round boundary.`,
75
+
llmContent: `Message queued for delivery to background task "${this.params.task_id}". The task will receive it at the next tool-round boundary.`,
76
76
returnDisplay: `Message queued for ${entry.description}`,
77
77
};
78
78
}
@@ -88,22 +88,22 @@ export class SendMessageTool extends BaseDeclarativeTool<
88
88
super(
89
89
SendMessageTool.Name,
90
90
ToolDisplayNames.SEND_MESSAGE,
91
-
'Send a text message to a running background agent. The message is delivered at the next tool-round boundary. Use this to provide additional instructions or context to a background agent.',
91
+
'Send a text message to a running background task. The message is delivered at the next tool-round boundary. Use this to provide additional instructions or context to a background task.',
92
92
Kind.Other,
93
93
{
94
94
type: 'object',
95
95
properties: {
96
-
to: {
96
+
task_id: {
97
97
type: 'string',
98
98
description:
99
-
'The ID of the running background agent (from the launch response).',
99
+
'The ID of the running background task (from the launch response).',
100
100
},
101
101
message: {
102
102
type: 'string',
103
-
description: 'The text message to send to the agent.',
103
+
description: 'The text message to send to the task.',
0 commit comments