MoonshotAI / MoonshotAI/kimi-code

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

Open Beginner friendly
#1,817 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

[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:

    • #1562 (v0.23.6) — added subagent.timeout_ms and raised the default from 30 minutes to 2 hours.
    • #1704 (v0.24.2) — aligned the subagent timeout across engines (fixed 2-hour default).
    • The v2 description was updated accordingly — packages/agent-core-v2/src/session/subagent/tools/agent.md:12 now reads "Subagents use a fixed 2-hour timeout", and agent-core-v2/test/tool/tool.test.ts:454 asserts it. The v1 copy was missed.
  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."

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/agent-core/src/tools/builtin/collaboration/agent.md and compare its Agent description with the v2 copy at packages/agent-core-v2/src/session/subagent/tools/agent.md. Update the v1 wording and the matching assertion in packages/agent-core/test/tools/agent.test.ts, then run that test file. Done means the v1 description and test reflect the current two-hour default without changing timeout enforcement.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, testing, tooling
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.