RPC agent crashes (unhandled process exit) on a single `null` input line
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
バグは packages/coding-agent/src/modes/rpc/rpc-mode.ts の handleInputLine 関数にあります。まず、JSON の解析方法と RpcCommand へのキャスト方法を調べてください。修正は、command.id にアクセスする前に null をガードし、例外をスローする代わりにエラーレスポンスを出力するようにすることです。修正によってプロセスが生き続けることを確認するために、再現コマンドを実行してください。
索引モデルが issue の本文から書いたものです。
説明
What happened?
A single line containing just null on stdin kills the whole RPC agent with an unhandled rejection, instead of returning an error response. Every other malformed line ([], 123, {}, "hi") is handled fine — only valid-JSON null is fatal:
$ printf 'null\n' | step --mode rpc
TypeError: Cannot read properties of null (reading 'id')
at handleInputLine (...)
Node.js v22.23.2 <- process exits
One bad line (from a client that emits a half-written frame, or any upstream producer) tears down the running session/daemon.
Steps to reproduce
printf 'null\n' | step --mode rpc- Process exits non-zero with the TypeError above; it should stay up.
Root cause: packages/coding-agent/src/modes/rpc/rpc-mode.ts handleInputLine casts the parsed payload to RpcCommand and reads command.id in both handleCommand and the catch. On null the first read throws, then the catch reads command.id again and re-throws, escaping as an unhandled rejection.
Expected behavior
Emit an error response frame for that line and keep serving subsequent commands.
Version
0.84.4
I'd like to implement the fix myself.
- 主要言語
- TypeScript
- スター
- 54
- フォーク
- 20
- 平均マージ
- 23分
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stepfun-ai/Step-Code のほかの issue
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stepfun-ai/Step-Code#153 · コメント 2 件 ·
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stepfun-ai/Step-Code#151 · コメント 1 件 ·
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stepfun-ai/Step-Code#149 · コメント 1 件 ·
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
stepfun-ai/Step-Code#148 · コメント 1 件 ·
-
untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
stepfun-ai/Step-Code#144 · コメント 1 件 ·
stepfun-ai/Step-Code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96687 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
AOSSIE-Org/DebateAI#582 · コメント 2 件 ·