[FEATURE] Make the actor wakeup probe timeout configurable
维护者通常 1 天内回复
@CoffeeAnon 已经在做这个了。
开始于 2026年11月20日。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
调研方向
Start with the RuntimeSubstratePolicy type that Harness and SandboxTemplate embed, then follow the hardcoded TimeoutSeconds: 30 in go/core/internal/substrate/actor_template.go and in sandbox.go. Trace how the kagent, byo, codex and claude compilers fill Revision, since the new *int32 field must be copied there and folded into the revision digest so unset revisions keep their existing digest. Done means the field validates 1-600, defaults to 30 when unset, and an unchanged manifest produces no new ActorTemplate. Note the author says a pull request already exists, so coordinate before starting.
由索引模型根据 Issue 内容生成。
描述
📋 Prerequisites
- I have searched the existing issues to avoid creating a duplicate
- By submitting this issue, you agree to follow our Code of Conduct
📝 Feature Summary
Add an optional spec.substrate.wakeupProbeTimeoutSeconds to Harness and SandboxTemplate, in place of the 30 second wakeup probe timeout that is hardcoded today.
❓ Problem Statement / Motivation
go/core/internal/substrate/actor_template.go compiles every runtime into an ActorTemplate whose wakeup probe has TimeoutSeconds: 30. sandbox.go hardcodes the same value for sandboxes. Substrate accepts any value, but no API field, Helm value or environment variable exposes it.
A runtime that is not ready within 30s of container start fails its golden build with:
GoldenActorCrashed: ... wakeup probe for "kagent" never returned 200 within 30s
The controller then retries with backoff, and the message reports a crash even when the runtime was only slow to start.
Anyone running the stack locally on a development machine can hit this. Under gVisor, import time dominates startup, and time to ready scales with the size of the runtime's dependency tree and the speed of the machine. On a local stack:
- kagent's own Go runtime is ready in under a second on golden builds and on resumes.
- A Python bring-your-own (BYO) runtime built on
kagent-coreandkagent-adktook 20 to 29s to become ready, which sits at the 30s limit. Some golden builds passed and some failed. Resumes of the same image took 20 to 28s, so the margin is thin on every resume too. - Precompiling bytecode helped but did not remove the problem.
Tuning the runtime resolved that case, but any BYO runtime with a larger dependency tree or any slower machine meets the same fixed limit with no setting to change.
💡 Proposed Solution
Add an optional typed field to RuntimeSubstratePolicy, which Harness and SandboxTemplate both embed:
spec:
substrate:
wakeupProbeTimeoutSeconds: 90
- Type
*int32, minimum 1, maximum 600. Unset means 30, so default behavior is unchanged. - The kagent, byo, codex and claude compilers copy the value into
Revision. - The value is part of the revision digest, because a changed timeout changes the ActorTemplate and ActorTemplates are immutable. The digest field is
omitempty, so a revision that leaves it unset keeps its existing digest and no ActorTemplate is recreated on upgrade. - The field is typed instead of an environment variable, as the review of #2358 asked for the bash tool timeout (#2357).
The implementation is ready as a pull request.
🔄 Alternatives Considered
- An environment variable on the controller or the runtime. Review of #2358 asked for typed configuration instead.
- A larger fixed default. This delays failure detection for every runtime to help the slowest one.
- Only tuning the runtime. This works for one image but leaves every other BYO runtime and slower machine with no setting.
🎯 Affected Service(s)
None
📚 Additional Context
Related changes that are not part of the proposed PR:
- The Python
kagent-core_bootstrap.load_bundlegives theGetBootstrapConfigfetch its own 20s deadline, commented as headroom inside the 30s probe. If the probe timeout is raised, that deadline should follow it. GoldenActorCrashedcould say when the probe timed out with the process still running.- The Python BYO docs could recommend shipping precompiled bytecode.
🙋 Are you willing to contribute?
- I am willing to submit a PR for this feature
- 主要语言
- Go
- 星标
- 4.5k
- 派生
- 937
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 150
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kagent-dev/kagent 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
kagent-dev/kagent#3792 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
kagent-dev/kagent#3790 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
kagent-dev/kagent#3789 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
kagent-dev/kagent#3787 ·
维护者通常 1 天内回复
-
[BUG] Python memory summarization fails for Gemini models: the request has no model name可能已有人在做 @BahaaMattar 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
kagent-dev/kagent#3710 ·
维护者通常 1 天内回复
查看 kagent-dev/kagent 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
-
难度 1/5 1 小时以内 新手友好度 82/100
-
Add CybeDefend未关闭
难度 1/5 1 小时以内 新手友好度 66/100
slavakurilyak/awesome-ai-agents#1031 ·