install.sh hand-off `exec claude … < /dev/tty` crashes with `EINVAL: invalid argument, kqueue` on macOS

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bash, bun, typescript
領域
cli

調査の方向性

まず install/install.sh の555~560行付近にある引き継ぎブロックを確認し、報告された Bun での再現例にある /dev/tty へのリダイレクトと、tty コマンドが端末デバイスを解決する方法を比較してください。インストールスクリプトのパイプが claude に渡されないことと、新規インストールおよび更新時の引き継ぎが macOS で動作することを確認してください。起動時に EINVAL でクラッシュしなくなり、提案された回避策が不要になれば完了です。

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

説明

Summary

The install finishes, but the last step ("Launching /LifeOS setup..." on a fresh install, "Launching /LifeOS update..." on an existing one) crashes. install.sh runs exec claude "$NEXT_INTENT" < "$TTY_DEV" with TTY_DEV defaulting to /dev/tty. On macOS, Bun cannot register the generic /dev/tty node with kqueue, so the process dies with an unhandled stream error. The user has to start the session by hand.

Environment

  • macOS 27.2.1 (arm64)
  • Bun 1.4.4 and 1.4.6 (the crash happens inside claude, which embeds Bun)
  • Reproduced in Terminal.app and in a second terminal, via curl -fsSL https://ourlifeos.ai/install.sh | bash, on both a fresh install and the update path

Minimal repro (no LifeOS or Claude Code involved)

bun -e 'process.stdin.resume(); setTimeout(() => process.exit(0), 500)' < /dev/tty
# -> error: EINVAL: invalid argument, kqueue   (Bun v1.4.4, macOS arm64)

bun -e 'process.stdin.resume(); setTimeout(() => process.exit(0), 500)' < "$(tty)"
# -> exits cleanly

Both commands were run separately in an interactive terminal; only the /dev/tty one crashes.

Actual output from the installer

ℹ Launching /LifeOS update...
error: EINVAL: invalid argument, kqueue
      at emitError (node:events:50:13)
      at emitErrorNT (internal:streams/destroy:88:12)
      at emitErrorCloseNT (internal:streams/destroy:69:14)

Bun v1.4.6 (macOS arm64)

Where

install/install.sh, hand-off block (~lines 555-560):

TTY_DEV="${LIFEOS_TTY:-/dev/tty}"
...
exec claude "$NEXT_INTENT" < "$TTY_DEV"

Suggested fix (untested)

The redirect exists so claude does not read the curl | bash script pipe. Resolving the real device name should keep that behavior:

TTY_DEV="${LIFEOS_TTY:-$(tty < /dev/tty 2>/dev/null || echo /dev/tty)}"

Alternatively, skip the redirect when [ -t 0 ] is already true. has_terminal should keep working unchanged.

Workaround

Run claude "/LifeOS setup" directly, or install with LIFEOS_NO_LAUNCH=1.

Related upstream

oven-sh/bun#24158 (closed) covers a similar /dev/tty + kqueue EINVAL on macOS. I have not checked which Bun release contains its fix.

主要言語
TypeScript
スター
20k
フォーク
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 を短くまとめたダイジェスト。