Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: exec timeouts above the Node timer limit cancel almost immediately

已关闭 适合新手
#441 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #448 来自 @yujiachen-y —— 已合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
cli

调研方向

从 packages/tui/src/headless/invocation.ts(L402-419 附近的超时解析器)开始,然后沿着 packages/tui/src/headless/runner.ts(L249-261)追踪 policy.timeoutMs,直到 packages/tui/src/application/run-coordinator.ts(L198-204)中的最终 setTimeout。决定在哪里强制执行 Node 的 2147483647 ms 限制:在解析时拒绝过大的时长,还是使用有界的时间器间隔进行截断/循环。当 --timeout 2147483648ms 和 --timeout 600h 不再立即过期,并且有一个测试能复现已报告的溢出行为且通过时,即为完成。

由索引模型根据 Issue 内容生成。

描述

Product or interface

CLI - headless

Version

Source commit 4401b0edb0e6ad753d3952b75a31ec87807b6aab; Node.js 24.14.1; pnpm 11.7.0.

Platform

Windows x64, OS build 10.0.26200.

Issue area

Other — execution timeout handling.

Steps to reproduce

The headless parser accepts --timeout 2147483648ms and --timeout 600h
because both convert to positive safe integers. The value is forwarded as
policy.timeoutMs, then passed directly to Node's setTimeout:

A minimal check of the underlying Node behavior, with no provider or credentials:

const start = performance.now();
setTimeout(() => console.log('unexpected early expiry:', performance.now() - start), 2147483648);

I also tested the complete pinned invocation and coordinator executable bodies
after Node's TypeScript transformation, using real Node timers and a synthetic
conversation port that finishes after 40 ms. The port records abortSession
calls; no model, network, tool or stored session is used. Three repeats each:

Parsed timeout Coordinator result Abort reason
2h succeeded none
2147483647ms succeeded none
2147483648ms timeout timeout
600h timeout timeout

This is an isolated component reproduction, not a built-CLI, live-provider,
interactive-TUI or ACP acceptance test. No actual 25-day execution is needed.

Expected and actual behavior

Expected: reject unsupported durations before starting a run, or preserve the
requested deadline using bounded timer intervals.

Actual: larger accepted durations cancel the run almost immediately. Node
clamps values above 2147483647 to 1 ms, as documented in
its timer API.
The coordinator separately forwards a deadline about 25 days in the future,
so the immediate local cancellation contradicts that deadline.

This affects unusually large timeout values; ordinary hour-scale controls passed.

Redacted error summary
TimeoutOverflowWarning: 2147483648 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
Before submitting
  • I have searched existing issues.
  • I have included my version and removed sensitive information.
主要语言
TypeScript
星标
2k
派生
250
平均合并
7 小时 37 分钟
30 天内合并 PR
147

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MiniMax-AI/minimax-code 的其他 Issue

查看 MiniMax-AI/minimax-code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。