Session still crashes with "JSON.stringify cannot serialize BigInt" after parallel scratch queries
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
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 810
- Forks
- 121
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 88
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de AltimateAI/altimate-code
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
AltimateAI/altimate-code#1454 ·
Los mantenedores suelen responder en 1 día
-
test: MCP tests fail when the developer's ~/.claude.json has MCP servers (HOME is not sandboxed)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AltimateAI/altimate-code#1386 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
AltimateAI/altimate-code#1384 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
AltimateAI/altimate-code#1323 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
AltimateAI/altimate-code#1288 ·
Los mantenedores suelen responder en 1 día
Todos los issues de AltimateAI/altimate-code
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
paperclipai/paperclip#16785 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
code-yeongyu/senpi#3661 ·
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
lingdojo/kana-dojo#32731 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
bug status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
mastra-ai/mastra#27538 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Yeachan-Heo/oh-my-codex#3822 ·
Los mantenedores suelen responder en 1 día