Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#1,486 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
sql, typescript
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
810
Forks
121
Merge medio
1 d 9 h
PR fusionados (30 d)
88

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AltimateAI/altimate-code

Todos los issues de AltimateAI/altimate-code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.