Session still crashes with "JSON.stringify cannot serialize BigInt" after parallel scratch queries
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- sql, typescript
- 領域
- backend
調査の方向性
Start with the existing guard in packages/opencode/src/session/llm.ts around line 112 and the helper in packages/opencode/src/altimate/util/json.ts, which normalises BigInt values for outgoing model messages. Then reproduce with four parallel sql_execute calls returning BIGINT columns to find the unguarded path where tool results are stored, persisted or traced. Done means a session-level test covering that scenario and a second model turn completes, with stored and traced results JSON-serializable.
索引モデルが issue の本文から書いたものです。
説明
Problem
A session died with UnknownError: JSON.stringify cannot serialize BigInt. after four parallel scratch sql_execute calls returned BIGINT counts. The run exited with status 1 and no answer, even though the answer had already been computed.
Mechanism
normalizeBigInts(input.messages) already guards outgoing model messages (packages/opencode/src/session/llm.ts:112, packages/opencode/src/altimate/util/json.ts:7), and an earlier fix landed for the same error. A different serialization path (tool-result storage, session persistence or tracing; the exact call site is not yet identified) is still unguarded when DuckDB returns BIGINT values from several concurrent tool calls.
Evidence
- 1 session out of about 1,255 scanned; it had the final table in hand at 47 s and then crashed on the next turn. The build already contained the earlier
normalizeBigIntsfix. - Not seen in sessions with Claude Opus.
Impact
Answer-losing but rare. Fatal when it happens.
Proposed fix
Normalise tool results to JSON-safe values at the single point where a tool result is stored, not only on outgoing model messages (BigInt to number when safe, string otherwise). Find the remaining throw site by reproducing with four parallel BIGINT-returning scratch queries.
Acceptance check
Session-level test: four parallel scratch sql_execute calls returning BIGINT columns, followed by a second model turn, completes without error and the stored/traced results are JSON-serializable.
- 主要言語
- TypeScript
- スター
- 810
- フォーク
- 121
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 89
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AltimateAI/altimate-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
AltimateAI/altimate-code#1454 ·
メンテナーはふだん 1 日以内に返信
-
test: MCP tests fail when the developer's ~/.claude.json has MCP servers (HOME is not sandboxed)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AltimateAI/altimate-code#1386 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
AltimateAI/altimate-code#1384 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
AltimateAI/altimate-code#1323 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
AltimateAI/altimate-code#1288 ·
メンテナーはふだん 1 日以内に返信
AltimateAI/altimate-code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
chrisparsons83/flexspotff#215 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
vitest-dev/vitest#11633 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信