Skip to content

fix(agent-core): align Agent tool timeout description with 2-hour default - #2428

Open
mangeshraut712 wants to merge 1 commit into
MoonshotAI:mainfrom
mangeshraut712:fix/agent-timeout-description-2h
Open

fix(agent-core): align Agent tool timeout description with 2-hour default#2428
mangeshraut712 wants to merge 1 commit into
MoonshotAI:mainfrom
mangeshraut712:fix/agent-timeout-description-2h

Conversation

@mangeshraut712

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • pnpm exec vitest run test/tools/agent.test.ts in packages/agent-core (32 passed)
  • CI

Made with Cursor

…ault

The embedded Agent tool markdown still said subagents use a fixed
30-minute timeout after the runtime default moved to 2 hours. Update the
description and the locking unit test so model-facing text matches
DEFAULT_SUBAGENT_TIMEOUT_MS.

Fixes MoonshotAI#2420
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a795ee2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@moonshot-ai/agent-core Patch
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a795ee2c4c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Describe the timeout as a default, not fixed

When deployments set [subagent] timeout_ms or KIMI_SUBAGENT_TIMEOUT_MS, the Agent tool is registered with that resolved value (resolveSubagentTimeoutMs(...), with 0 meaning no timeout), so this changed prompt now tells the model every subagent has a fixed 2-hour deadline even when the real deadline is shorter, longer, or disabled. That can make the model plan background delegation or timeout recovery around the wrong limit; please describe 2 hours as the default or render the resolved timeout in the tool description.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] agent-core v1 Agent tool description says "fixed 30-minute timeout", actual default is 2 hours

1 participant