The Open Framework for Building Agents
feat(eve): remove task_sleep (#2326)
vercel-gh-bot-4[bot]f2169fa26c43
diff --git a/.changeset/prune-task-sleep.md b/.changeset/prune-task-sleep.mdnew file mode 100644index 000000000..bdec33c30--- /dev/null+++ b/.changeset/prune-task-sleep.md@@ -0,0 +1,5 @@+---+"eve": patch+---++Remove the `task_sleep` framework tool. Task-mode parents now rely on lifecycle notifications instead of model-paced waits.diff --git a/packages/eve/src/cli/dev/tui/tool-presentation.test.ts b/packages/eve/src/cli/dev/tui/tool-presentation.test.tsindex 9aed4a8aa..553ab7357 100644--- a/packages/eve/src/cli/dev/tui/tool-presentation.test.ts+++ b/packages/eve/src/cli/dev/tui/tool-presentation.test.ts@@ -180,7 +180,6 @@ describe("presentTool", () => {read_file: { filePath: "/workspace/a.ts" },task_cancel: { taskIds: ["task_abc"] },task_update: { message: "Finished the next region." },- task_sleep: { seconds: 30 },todo: { todos: [] },web_fetch: { url: "https://example.com" },web_search: { query: "eve framework" },@@ -204,6 +203,10 @@ describe("presentTool", () => {expect(presentation.subtitle).toContain('format="markdown"');});+ it("does not retain semantic copy for the removed task_sleep tool", () => {+ expect(presentTool("task_sleep", { seconds: 30 }).title).toBe("task_sleep");+ });+it("presents a named subagent dispatch as a delegation", () => {const parsed = presentTool("stock-price",diff --git a/packages/eve/src/cli/dev/tui/tool-presentation.ts b/packages/eve/src/cli/dev/tui/tool-presentation.tsindex a49876bcc..c528a4f91 100644--- a/packages/eve/src/cli/dev/tui/tool-presentation.ts+++ b/packages/eve/src/cli/dev/tui/tool-presentation.ts@@ -131,14 +131,6 @@ const BUILTIN_TOOL_COPY: Readonly<Record<string, BuiltinToolCopy>> = {singularNoun: "task",pluralNoun: "tasks",},- task_sleep: {- verb: "Pause",- pastVerb: "Paused",- argKey: "seconds",- extractItem: sleepSecondsArg,- singularNoun: "pause",- pluralNoun: "pauses",- },task_update: {verb: "Update",pastVerb: "Updated",@@ -392,14 +384,6 @@ function taskIdsArg(input: unknown): string | undefined {return salientLine(ids.join(", "));}-/** Formats a `seconds: number` argument as a duration. */-function sleepSecondsArg(input: unknown): string | undefined {- if (input === null || typeof input !== "object" || Array.isArray(input)) return undefined;- const value = (input as Record<string, unknown>).seconds;- if (typeof value !== "number" || !Number.isFinite(value)) return undefined;- return `${String(value)}s`;-}-function salientArg(input: unknown, key: string): string | undefined {if (input === null || typeof input !== "object" || Array.isArray(input)) return undefined;const value = (input as Record<string, unknown>)[key];diff --git a/packages/eve/src/execution/node-step.test.ts b/packages/eve/src/execution/node-step.test.tsindex 027836bfa..056f90948 100644--- a/packages/eve/src/execution/node-step.test.ts+++ b/packages/eve/src/execution/node-step.test.ts@@ -278,7 +278,7 @@ describe("createNodeHarnessTools", () => {it("does not inject task tools without experimental.tasks", () => {const tools = createNodeHarnessTools({ node: createTestNode() });- for (const name of ["task_cancel", "task_sleep", "task_update"]) {+ for (const name of ["task_cancel", "task_update"]) {expect(tools.has(name)).toBe(false);}});@@ -299,8 +299,7 @@ describe("createNodeHarnessTools", () => {expect(tools.get(name)?.runtimeAction).toEqual({ kind: "task-control" });expect(tools.get(name)?.execute).toBeUndefined();}- expect(tools.get("task_sleep")?.execute).toBeDefined();- expect(tools.get("task_sleep")?.runtimeAction).toBeUndefined();+ expect(tools.has("task_sleep")).toBe(false);});it("respects disableTool for individual task tools", () => {@@ -316,7 +315,7 @@ describe("createNodeHarnessTools", () => {},});- expect(tools.has("task_sleep")).toBe(true);+ expect(tools.has("task_update")).toBe(true);expect(tools.has("task_cancel")).toBe(false);});});diff --git a/packages/eve/src/harness/advertised-tools.test.ts b/packages/eve/src/harness/advertised-tools.test.tsindex 07e580498..b9446276e 100644--- a/packages/eve/src/harness/advertised-tools.test.ts+++ b/packages/eve/src/harness/advertised-tools.test.ts@@ -139,20 +139,18 @@ describe("getAdvertisedTools for definition arrays", () => {const tools = new Map([["add", createTool("add")],["task_cancel", createTaskControlTool("task_cancel")],- ["task_sleep", createTool("task_sleep")],["task_update", createTaskControlTool("task_update")],]) satisfies HarnessToolMap;const advertisedTools = getAdvertisedTools({ session: {}, tools });- expect([...advertisedTools.keys()]).toEqual(["add", "task_cancel", "task_sleep"]);+ expect([...advertisedTools.keys()]).toEqual(["add", "task_cancel"]);});it("keeps only task_update in delegated sessions", () => {const tools = new Map([["add", createTool("add")],["task_cancel", createTaskControlTool("task_cancel")],- ["task_sleep", createTool("task_sleep")],["task_update", createTaskControlTool("task_update")],]) satisfies HarnessToolMap;diff --git a/packages/eve/src/runtime/framework-tools/index.test.ts b/packages/eve/src/runtime/framework-tools/index.test.tsindex bf5cbd52c..848ea2520 100644--- a/packages/eve/src/runtime/framework-tools/index.test.ts+++ b/packages/eve/src/runtime/framework-tools/index.test.ts@@ -24,6 +24,7 @@ describe("framework-tools/index", () => {expect(names.has("ask_question")).toBe(true);expect(names.has("agent")).toBe(true);expect(names.has("task_update")).toBe(true);+ expect(names.has("task_sleep")).toBe(false);expect(names.has("task_send")).toBe(false);// connection_search is now a dynamic tool resolver, not a framework toolexpect(names.has("connection_search")).toBe(false);diff --git a/packages/eve/src/runtime/framework-tools/tasks.ts b/packages/eve/src/runtime/framework-tools/tasks.tsindex b5bae7f49..c29d4d354 100644--- a/packages/eve/src/runtime/framework-tools/tasks.ts+++ b/packages/eve/src/runtime/framework-tools/tasks.ts@@ -1,6 +1,5 @@import { z } from "#compiled/zod/index.js";-import { requestTurnSleep } from "#harness/turn-sleep.js";import type { HarnessToolDefinition } from "#harness/execute-tool.js";import type { ResolvedToolDefinition } from "#runtime/types.js";@@ -9,20 +8,17 @@ import type { ResolvedToolDefinition } from "#runtime/types.js";** With the flag on, subagent calls return a task receipt instead of* blocking the parent turn; these tools coordinate that delegated work.- * `task_cancel` and `task_update` are- * execute-less runtime actions — they need durable session state and- * world access, so the runtime-action dispatch step executes them.- * `task_sleep` only records a durable pause and executes in-loop.+ * `task_cancel` and `task_update` are execute-less runtime actions —+ * they need durable session state and world access, so the runtime-action+ * dispatch step executes them.*/export const TASK_CANCEL_TOOL_NAME = "task_cancel";-export const TASK_SLEEP_TOOL_NAME = "task_sleep";export const TASK_UPDATE_TOOL_NAME = "task_update";/** Every model-visible task tool name, for gating and dispatch matching. */export const TASK_TOOL_NAMES: ReadonlySet<string> = new Set([TASK_CANCEL_TOOL_NAME,- TASK_SLEEP_TOOL_NAME,TASK_UPDATE_TOOL_NAME,]);@@ -43,12 +39,6 @@ export const TASK_UPDATE_INPUT_SCHEMA = z.strictObject({message: z.string().min(1).describe("Brief description of what this task is currently doing."),});-const MAX_SLEEP_SECONDS = Math.floor(Number.MAX_SAFE_INTEGER / 1_000);--export const TASK_SLEEP_INPUT_SCHEMA = z.strictObject({- seconds: z.number().positive().max(MAX_SLEEP_SECONDS).describe("How long to wait, in seconds."),-});-const TASK_VIEW_SCHEMA = z.object({inputRequests: z.array(z.unknown()).optional(),lastOutput: z@@ -71,18 +61,10 @@ export const TASK_VIEWS_OUTPUT_SCHEMA = z.object({tasks: z.array(TASK_VIEW_SCHEMA),});-export const TASK_SLEEP_OUTPUT_SCHEMA = z.strictObject({- waitedSeconds: z.number().positive(),-});-const TASK_CANCEL_DESCRIPTION ="Request cooperative cancellation of one or more background tasks. " +"Cancellation is final: a task that finishes after you cancel it stays cancelled. Cancelling an already-finished task changes nothing.";-const TASK_SLEEP_DESCRIPTION =- "Pause durably before continuing while waiting for a background-task notification. " +- "Does not read or change any task.";-const TASK_UPDATE_DESCRIPTION ="Briefly tell the parent agent what this background task is currently doing. " +"Report activity, not preliminary findings or results.";@@ -102,16 +84,6 @@ export function createTaskToolHarnessDefinitions(): readonly HarnessToolDefinitioutputSchema: TASK_VIEWS_OUTPUT_SCHEMA,runtimeAction: { kind: "task-control" },},- {- description: TASK_SLEEP_DESCRIPTION,- execute: async (input: { readonly seconds: number }) => {- requestTurnSleep(Math.ceil(input.seconds * 1_000));- return { waitedSeconds: input.seconds };- },- inputSchema: TASK_SLEEP_INPUT_SCHEMA,- name: TASK_SLEEP_TOOL_NAME,- outputSchema: TASK_SLEEP_OUTPUT_SCHEMA,- },{description: TASK_UPDATE_DESCRIPTION,inputSchema: TASK_UPDATE_INPUT_SCHEMA,@@ -165,6 +137,5 @@ function createResolvedTaskToolStub(input: {*/export const TASK_TOOL_DEFINITIONS: readonly ResolvedToolDefinition[] = [createResolvedTaskToolStub({ description: TASK_CANCEL_DESCRIPTION, name: TASK_CANCEL_TOOL_NAME }),- createResolvedTaskToolStub({ description: TASK_SLEEP_DESCRIPTION, name: TASK_SLEEP_TOOL_NAME }),createResolvedTaskToolStub({ description: TASK_UPDATE_DESCRIPTION, name: TASK_UPDATE_TOOL_NAME }),];diff --git a/packages/eve/src/runtime/prompt/compose.test.ts b/packages/eve/src/runtime/prompt/compose.test.tsindex d4dda8005..1be19d5ad 100644--- a/packages/eve/src/runtime/prompt/compose.test.ts+++ b/packages/eve/src/runtime/prompt/compose.test.ts@@ -36,6 +36,7 @@ describe("composeRuntimeBasePrompt", () => {expect.stringContaining("notifications include the task's result"),);expect(prompt).not.toContainEqual(expect.stringContaining("task_peek"));+ expect(prompt).not.toContainEqual(expect.stringContaining("task_sleep"));expect(prompt).toContainEqual(expect.stringContaining("notify you"));});diff --git a/packages/eve/src/runtime/prompt/compose.ts b/packages/eve/src/runtime/prompt/compose.tsindex 6ecafe198..3b496e5f2 100644--- a/packages/eve/src/runtime/prompt/compose.ts+++ b/packages/eve/src/runtime/prompt/compose.ts@@ -15,7 +15,7 @@ const AGENT_MESSAGING_INSTRUCTION ="Agent messaging\nAgents you have already delegated to stay available after they answer. eve injects the current `<agents>` list into the conversation as a note labeled `[Agents]`; it is added automatically by the framework, not written by the user, and never requires a reply. The list is only a record of those existing agents — their `agentId`, name, and latest status. It does not limit which subagent tools you can call: your tool list is the source of truth, and any subagent tool can always be called without `agentId` to start a new agent, including when the `<agents>` list is empty or absent. Pass `agentId` to the same subagent tool only to continue one of those existing agents' sessions.";const TASK_AGENT_MESSAGING_INSTRUCTION =- "Agent messaging\nSubagent calls start durable background tasks and return immediately with a task receipt. After delegating, continue helping the user or end your turn; do not wait with task_sleep unless the user explicitly asks you to wait or the task result is required before you can answer. The task will notify you when it completes, fails, needs input, or sends an update; completion and failure notifications include the task's result. Agents you have already delegated to remain visible in the framework-authored `<agents>` conversation note. `availability=busy` means the listed task still owns that agent session: wait for its notification or use task_cancel with its taskId instead of starting a continuation. `availability=available` means no nonterminal task owns the session, so you may pass agentId to the original subagent tool to continue it. Calling a subagent without agentId always starts a new agent session.";+ "Agent messaging\nSubagent calls start durable background tasks and return immediately with a task receipt. After delegating, continue helping the user or end your turn. The task will notify you when it completes, fails, needs input, or sends an update; completion and failure notifications include the task's result. Agents you have already delegated to remain visible in the framework-authored `<agents>` conversation note. `availability=busy` means the listed task still owns that agent session: wait for its notification or use task_cancel with its taskId instead of starting a continuation. `availability=available` means no nonterminal task owns the session, so you may pass agentId to the original subagent tool to continue it. Calling a subagent without agentId always starts a new agent session.";/*** Input for composing the base authored instructions prompt for onediff --git a/research/subagents-as-tasks-implementation.md b/research/subagents-as-tasks-implementation.mdindex 98ace0145..e5e2b8751 100644--- a/research/subagents-as-tasks-implementation.md+++ b/research/subagents-as-tasks-implementation.md@@ -1,7 +1,7 @@---issue: https://github.com/vercel/eve/issues/1084status: draft-last_updated: "2026-08-19"+last_updated: "2026-08-20"---# Subagents as tasks: additive delivery plan@@ -102,11 +102,10 @@ lifecycle path.### Stage 2 — task tools, undiscoverable-Register the task tools (`task_cancel`, `task_sleep`, `task_update`)+Register the task tools (`task_cancel`, `task_update`)as framework tools, filtered out of the tool set unless the flag is on. The first implementationhas no child-facing task tool.-- `task_sleep` reuses the existing durable turn-sleep request.- `task_cancel` reads the session task index; an `agentId` continuation resolves aterminal task's child address through the agent handle store and starts a new task.diff --git a/research/tools-as-tasks.md b/research/tools-as-tasks.mdindex f116c34ad..90a405350 100644--- a/research/tools-as-tasks.md+++ b/research/tools-as-tasks.md@@ -1,7 +1,7 @@---issue: https://github.com/vercel/eve/issues/1084status: draft-last_updated: "2026-08-19"+last_updated: "2026-08-20"---# Subagents as tasks@@ -11,9 +11,9 @@ last_updated: "2026-08-19"Under an opt-in `experimental.tasks` mode, eve should represent long-running work as durable,addressable tasks. This plan applies that model only to local and remote subagents. A subagent callreturns a task receipt after dispatch instead of keeping the parent turn blocked until the child-finishes. The parent receives result-bearing lifecycle notifications and can wait for or cancel-the task with framework-owned tools. The child can intentionally report progress to its parent-with one framework-owned tool.+finishes. The parent receives result-bearing lifecycle notifications and can cancel the task with+a framework-owned tool. The child can intentionally report progress to its parent with one+framework-owned tool.Without the flag, current tool and subagent behavior must remain unchanged.@@ -53,7 +53,7 @@ cancel paths.## Goals- Let a parent continue its turn while delegated work runs.-- Give the model explicit task controls instead of making every wait implicit.+- Wake the parent through lifecycle notifications instead of model-paced task checks.- Let a child intentionally report progress to its parent instead of leaving progress tochannel-layer guesswork.- Carry progress, input requests, authorization events, results, failures, and cancellation over@@ -127,7 +127,6 @@ The parent receives these framework-owned tools:interface TaskParentTools {task_cancel(input: { taskIds: string[] }): Promise<TaskToolResult<boolean>>;task_update(input: { message: string }): Promise<{ status: "sent"; taskId: string }>;- task_sleep(input: { seconds: number }): Promise<TaskToolResult<boolean>>;}```@@ -140,7 +139,6 @@ The controls have distinct behavior:bound to the same child session. It never reopens a terminal task or answers HITL.- `task_cancel` requests cooperative cancellation. A committed terminal state is final, so a latechild result cannot revive a cancelled task.-- `task_sleep` durably pauses the current turn for paced checks. It does not poll or mutate a task.There is no child-facing task tool in the first implementation. Child-to-parent lifecycle andHITL communication is framework-owned; progress reporting remains a separate follow-up.@@ -347,8 +345,8 @@ The current [MCP Tasks extension] provides the closest standard vocabulary:eve's `task_cancel` maps to cancellation. Result-bearing notifications replace a model-facing`tasks/get` operation: the model receives ready state at the transition that wakes it instead of-performing a second read that can race the queued notification. `task_sleep` is an eve control,-not an MCP method. eve is not implementing the MCP wire protocol in this work.+performing a second read that can race the queued notification. eve is not implementing the MCP+wire protocol in this work.One semantic difference is decided. MCP treats a tool-level `isError: true` result as`completed`; `failed` is reserved for JSON-RPC execution failure. eve diverges: child failure