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

Session still crashes with "JSON.stringify cannot serialize BigInt" after parallel scratch queries

オープン
#1,486 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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 normalizeBigInts fix.
  • 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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

AltimateAI/altimate-code のほかの issue

AltimateAI/altimate-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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