diff --git a/.changeset/fix-v1-agent-tool-description-timeout.md b/.changeset/fix-v1-agent-tool-description-timeout.md new file mode 100644 index 0000000000..61b9f417e8 --- /dev/null +++ b/.changeset/fix-v1-agent-tool-description-timeout.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Correct the v1 engine `Agent` tool description to say "fixed 2-hour timeout" instead of the stale "fixed 30-minute timeout" — the default was raised to 2 hours in v0.23.6 (#1562) and aligned across engines in v0.24.2 (#1704), but the v1 tool description shown to the model was missed. Since the interactive CLI defaults to the v1 engine, this stale text is what most sessions injected into model context, which could cause the model to unnecessarily split long delegations or resume subagents believing they had been killed by a nonexistent 30-minute cap. Actual enforcement was already correct; only the LLM-facing description was wrong. diff --git a/packages/agent-core/src/tools/builtin/collaboration/agent.md b/packages/agent-core/src/tools/builtin/collaboration/agent.md index ec0533e7ef..d8b65d7c0d 100644 --- a/packages/agent-core/src/tools/builtin/collaboration/agent.md +++ b/packages/agent-core/src/tools/builtin/collaboration/agent.md @@ -9,7 +9,7 @@ Writing the prompt: Usage notes: - When the task continues earlier work a subagent already did, prefer resuming that agent (pass its `resume` id) over spawning a fresh instance — the resumed agent keeps its prior context. - A subagent's result is only visible to you, not to the user. When the user needs to see what a subagent produced, summarize the relevant parts yourself in your own reply. -- Subagents use a fixed 30-minute timeout. If one times out, resume the same agent instead of starting over. +- Subagents use a fixed 2-hour timeout. If one times out, resume the same agent instead of starting over. When NOT to use Agent: skip delegation for trivial work you can do directly — reading a file whose path you already know, searching a small known set of files, or any task that takes only a step or two. Delegation has a context-handoff cost; it pays off only when the task is substantial enough to outweigh it. diff --git a/packages/agent-core/test/tools/agent.test.ts b/packages/agent-core/test/tools/agent.test.ts index ec5109c2ef..b277023753 100644 --- a/packages/agent-core/test/tools/agent.test.ts +++ b/packages/agent-core/test/tools/agent.test.ts @@ -128,7 +128,7 @@ describe('AgentTool', () => { const host = mockSubagentHost({ spawn: vi.fn() }); const tool = agentTool(host); - expect(tool.description).toContain('fixed 30-minute timeout'); + expect(tool.description).toContain('fixed 2-hour timeout'); expect(tool.description).not.toContain('operator-configured background timeout'); expect(tool.description).not.toContain('no time limit'); // Background guidance must steer foreground-by-default, so the model doesn't