fix(server): thread snapshot returns empty HTTP 400 when an AskUserQuestion entry has no question text
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
packages/shared/src/toolActivity.ts の projectQuestionToolInput から始め、既存のテストを見つけて、質問テキストがない場合にどのように表現されているかを確認します。要求された toStrictEqual のリグレッションカバレッジを追加し、不完全な AskUserQuestion アクティビティを含む thread snapshot によって、報告された HTTP 400 や空のレスポンスが発生しなくなったことを検証します。
索引モデルが issue の本文から書いたものです。
説明
Version: v0.0.42 (stock npm install); the same code is on current main and the v0.0.43 nightly/preview tags as of 2026-09-26.
Repro
In a Claude thread, the model calls AskUserQuestion with an entry that has header and options but no question text (Claude rejects the call and the agent retries). The same shape also appears transiently when a streamed tool.updated for AskUserQuestion holds input.questions: [{}] because header streams before question.
From then on GET /api/orchestration/threads/:id returns HTTP 400 with an empty body; the web and mobile clients never load the thread ("waiting for input" / loading forever), while every other thread is fine. The WebSocket thread snapshot path fails the same way.
Server trace:
HttpApiSchemaError: Body … SchemaError: Expected JSON value at ["thread"]["activities"][N]["payload"]
Root cause
projectQuestionToolInput (packages/shared/src/toolActivity.ts) maps each question to { question: asTrimmedString(...) }, which yields { question: undefined } when there is no text. OrchestrationThreadActivity.payload is Schema.Unknown, and the HttpApi JSON codec rejects undefined, so one bad activity fails the whole snapshot. Because the failed call's tool.completed row is kept, the thread stays unloadable permanently.
Proposed fix
Leave the key out when there is no text:
// packages/shared/src/toolActivity.ts, projectQuestionToolInput
text === undefined ? {} : { question: text }
with a toStrictEqual regression test. Clients already read record(question)?.question, so a missing key is handled. It may also be worth making projectActivityPayload JSON-safe in general (drop undefined values) so a single malformed activity can never make a thread unloadable.
Possibly related symptom: #10418.
Found and patched with Claude Opus 5.5 via Claude Code; a one-commit local build with this change fixes it here.
- 主要言語
- TypeScript
- スター
- 23.6k
- フォーク
- 6.1k
- 平均マージ
- 10時間 20分
- マージ済み PR(30日)
- 309
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
bug via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pingdotgg/t3code#14452 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
lichess-org/api#678 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
PostHog/posthog.com#20628 ·
メンテナーはふだん 1 日以内に返信
-
bug status:Needs Triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
jupyterlab/jupyterlab#19964 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agentscope-ai/QwenPaw#8064 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: notebooks-jupyter bug theme: new notebook frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
posit-dev/positron#16347 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信