Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

RPC agent crashes (unhandled process exit) on a single `null` input line

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

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

評価

難易度
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 の本文から書いたものです。

説明

untriaged

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

  1. printf 'null\n' | step --mode rpc
  2. 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

stepfun-ai/Step-Code のほかの issue

stepfun-ai/Step-Code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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