[Bug] v1 engine Agent tool description still claims "fixed 30-minute timeout" (actual default: 2 hours)
Summary
The v1 engine's Agent tool description tells the model that subagents use "a fixed 30-minute timeout", but the actual default has been 2 hours since v0.23.6. Because the interactive CLI defaults to the v1 engine, this stale text is what most sessions inject into the model's context.
The timeout enforcement is correct (2h, configurable) — only the LLM-facing description is wrong.
Environment
- kimi-code 0.26.0 (latest release, published 2026-07-16; verified via the auto-updater manifest)
- Linux x86-64, interactive TUI mode (default v1 engine)
Evidence
-
Stale description (v1) — packages/agent-core/src/tools/builtin/collaboration/agent.md:12:
Subagents use a fixed 30-minute timeout. If one times out, resume the same agent instead of starting over.
This file is embedded verbatim into the tool description (AGENT_DESCRIPTION_BASE via ?raw import in agent.ts), so every v1-engine session shows the model this text.
-
Test enshrines the stale text — packages/agent-core/test/tools/agent.test.ts:131:
expect(tool.description).toContain('fixed 30-minute timeout');
This assertion was never updated when the default changed, which is why the drift went unnoticed.
-
Actual default is 2 hours — packages/agent-core/src/session/subagent-host.ts:33:
export const DEFAULT_SUBAGENT_TIMEOUT_MS = 2 * 60 * 60 * 1000;
Overridable via [subagent] timeout_ms in config.toml or KIMI_SUBAGENT_TIMEOUT_MS (env takes precedence).
-
History:
-
Runtime confirmation: a 0.26.0 interactive session's injected Agent tool description matches the v1 agent.md verbatim (30-minute wording), and the shipped 0.26.0 binary contains both the "30-minute" (v1) and "2-hour" (v2) strings.
Impact
- The model plans around a nonexistent 30-minute cap: it may unnecessarily split long delegations, or resume subagents believing they were killed by a 30-minute deadline.
- The word "fixed" also hides the fact that the timeout is configurable (
[subagent] timeout_ms / KIMI_SUBAGENT_TIMEOUT_MS), so neither the model nor users reading logs learn about the escape hatch.
- No functional breakage: actual enforcement is 2 hours in both engines, foreground, background, and AgentSwarm alike.
Suggested fix
- Update
packages/agent-core/src/tools/builtin/collaboration/agent.md:12 to match v2 ("fixed 2-hour timeout"), or better: render the value dynamically (e.g. via formatSubagentTimeoutDescription(resolveSubagentTimeoutMs(...))) so the description cannot drift from the code again.
- Update the assertion in
packages/agent-core/test/tools/agent.test.ts:131 accordingly.
- (Optional) Mention in the description that the timeout is configurable, e.g. "Subagents use a 2-hour timeout by default, configurable via
[subagent] timeout_ms."
[Bug] v1 engine Agent tool description still claims "fixed 30-minute timeout" (actual default: 2 hours)
Summary
The v1 engine's
Agenttool description tells the model that subagents use "a fixed 30-minute timeout", but the actual default has been 2 hours since v0.23.6. Because the interactive CLI defaults to the v1 engine, this stale text is what most sessions inject into the model's context.The timeout enforcement is correct (2h, configurable) — only the LLM-facing description is wrong.
Environment
Evidence
Stale description (v1) —
packages/agent-core/src/tools/builtin/collaboration/agent.md:12:This file is embedded verbatim into the tool description (
AGENT_DESCRIPTION_BASEvia?rawimport inagent.ts), so every v1-engine session shows the model this text.Test enshrines the stale text —
packages/agent-core/test/tools/agent.test.ts:131:This assertion was never updated when the default changed, which is why the drift went unnoticed.
Actual default is 2 hours —
packages/agent-core/src/session/subagent-host.ts:33:Overridable via
[subagent] timeout_msin config.toml orKIMI_SUBAGENT_TIMEOUT_MS(env takes precedence).History:
subagent.timeout_msand raised the default from 30 minutes to 2 hours.packages/agent-core-v2/src/session/subagent/tools/agent.md:12now reads "Subagents use a fixed 2-hour timeout", andagent-core-v2/test/tool/tool.test.ts:454asserts it. The v1 copy was missed.Runtime confirmation: a 0.26.0 interactive session's injected
Agenttool description matches the v1agent.mdverbatim (30-minute wording), and the shipped 0.26.0 binary contains both the "30-minute" (v1) and "2-hour" (v2) strings.Impact
[subagent] timeout_ms/KIMI_SUBAGENT_TIMEOUT_MS), so neither the model nor users reading logs learn about the escape hatch.Suggested fix
packages/agent-core/src/tools/builtin/collaboration/agent.md:12to match v2 ("fixed 2-hour timeout"), or better: render the value dynamically (e.g. viaformatSubagentTimeoutDescription(resolveSubagentTimeoutMs(...))) so the description cannot drift from the code again.packages/agent-core/test/tools/agent.test.ts:131accordingly.[subagent] timeout_ms."