Sol/Astra: `Worker.ts wait` defaults to 540 s, but Claude Code moves a subagent's foreground Bash call to the background after 180 s, and the codex run is then killed

オープン 初心者向け
#2,824 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
tooling

調査の方向性

LIFEOS/TOOLS/Worker.ts:179 から始めてください。ここで WAIT_DEFAULT_SECONDS は 540 に設定されており、wait コマンドで --max-seconds がそれをどのように上書きするかを確認します。デフォルトを 150 に下げ、次に agents/Sol.md と agents/Astra.md の "blocks for up to 540 seconds" という文を更新してください。Sol の監査がバックグラウンドに回されることなくフォアグラウンドで wait をループし、判定を出して完了したら完了です。

索引モデルが issue の本文から書いたものです。

説明

What. agents/Sol.md and agents/Astra.md start the codex helper in the background and then wait in the foreground with bun ~/.claude/LIFEOS/TOOLS/Worker.ts wait <lane> --slug <slug> (Bash timeout: 560000). With no --max-seconds, the wait uses WAIT_DEFAULT_SECONDS = 540 (LIFEOS/TOOLS/Worker.ts:179).

Claude Code 2.1.322 moves a subagent's foreground Bash call to the background once it has run for 180 s (the client's constant is 180000 ms, applied to async subagents unless the prompt cache setting is "off" or "1h").

What happens. Observed timeline of one failed Sol audit:

Time Event
+0 s The wrapper starts CodexProgress.ts in the background and waits in the foreground
+3 min The client moves the wait to the background
+3 min 15 s The wrapper has nothing left in the foreground, so it ends its turn
+8.5 min Both background tasks end with "failed with exit code 144", and the helper logs failed to send SIGTERM ... EPERM
Result verdict "error", exit_code null, duration 512,701 ms, no audit

Shorter runs sometimes survive, because codex can finish inside the window between the wrapper going idle and the kill (two earlier runs of 405 s and 464 s were backgrounded the same way and still finished). Longer runs are at risk; the one observed failure ended at 512 s.

Suggested fix. Keep every single wait under 180 s, so the wrapper stays in the foreground and simply loops on running, as both agent files already instruct:

  1. Lower WAIT_DEFAULT_SECONDS to 150 (any value comfortably under 180 works). This fixes every caller at once.
  2. Update the "blocks for up to 540 seconds" sentence in both agent files to match.

In practice, ten consecutive Sol audits that waited at most 150 s per call each made 2 to 4 waits, none was moved to the background, and all of them finished.

Open question for the maintainers. What ends the backgrounded tasks about five minutes after the wrapper goes idle? It may be tied to the subagent's lifecycle or to the prompt-cache window. If that kill is intended client behaviour, then any LifeOS wrapper that holds a long foreground call is exposed, not only these two.

主要言語
TypeScript
スター
19.8k
フォーク
2.5k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

danielmiessler/LifeOS のほかの issue

danielmiessler/LifeOS の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。