Skip to content

[Bug] v1 engine Agent tool description still claims "fixed 30-minute timeout" (actual default: 2 hours) #1817

Description

@chengkeen

[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

  1. 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.

  2. Test enshrines the stale textpackages/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.

  3. Actual default is 2 hourspackages/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).

  4. History:

  5. 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

  1. 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.
  2. Update the assertion in packages/agent-core/test/tools/agent.test.ts:131 accordingly.
  3. (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."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions