ai-harness: view.dispose() doesn't cancel snapshot, transcript or describe requests
Los mantenedores suelen responder en 1 día
@AlemTuzlak ya está trabajando en esto.
Desde el 1/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
What happens
With @tanstack/ai-harness 0.1.1, view.dispose() aborts only the events stream. Requests the view starts on its own (the snapshot it reloads after a turn ends, and transcript() and describe()) keep running after dispose(), and the view can't cancel them.
We see this in tests that open a view against a real Fastify server, ask one question, dispose the view, then close the server. In about half the runs, the snapshot refresh that follows the turn's end is still in flight when app.close() starts. Its keep-alive connection survives the close, and app.close() waits until the keep-alive timeout runs out, so the test times out. The last request the server got before the hang is always GET .../snapshot.
Expected
dispose() cancels every request the view started. A disposed view leaves no request open.
Why
SessionViewSourcepasses asignalonly toevents.snapshot,transcriptanddescribetake no options (src/view/index.ts, around line 195).refreshSnapshot,reloadandreadycallsource.snapshot()/source.transcript()without a signal (around lines 914, 987 and 1184), andrefreshSnapshotruns after events that change the snapshot (line 1101).dispose()setsdisposedand callsreader.abort()(line 1346). Thedisposedchecks drop the results of the other requests, but the requests themselves keep going.- In the client,
read()(src/client.ts, line 691) has no signal to pass on either.
Checked on main at 3ce3085.
Workaround
In our test server's close, we call server.closeAllConnections() right after starting app.close().
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.3k
- Forks
- 378
- Merge medio
- 1 d 1 min
- PR fusionados (30 d)
- 208
Preparar el entorno
- 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 TanStack/ai
-
openai-base: a Responses max_output_tokens cutoff ends as RUN_ERROR without usage instead of finishReason 'length'Posiblemente ocupada @tombeckenham la tomó hace 4 días. Abiertohas-pr waiting-on: maintainer
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
TanStack/ai#1916 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
openai-base: leaving a Responses stream at `response.completed` aborts its request, so complete calls are logged as client-closed (499)Posiblemente ocupada @AlemTuzlak la tomó hoy. Abiertohas-pr waiting-on: maintainer
TanStack/ai#1965 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
StreamProcessor folds long text and tool-call streams in quadratic memory and timePosiblemente ocupada @jherr la tomó hoy. Abiertowaiting-on: maintainer
TanStack/ai#1963 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
ai-anthropic: 400 on signed thinking blocks after compaction rewrites history (missing block_binding drop_block)Posiblemente ocupada @tombeckenham la tomó hace 2 días. Abiertowaiting-on: maintainer
TanStack/ai#1959 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Chat UI: a fallback widget for tool calls whose names aren't known when the kit is createdPosiblemente ocupada @AlemTuzlak la tomó hace 3 días. Abiertowaiting-on: maintainer
Dificultad 4/5 1-2 días Aptitud para principiantes 58/100
TanStack/ai#1953 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/ai
Issues similares
-
Add API: BlockVectra Data APIAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
remotion-dev/remotion#12905 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
supermomonga/paseo-plugin-zcode-provider#83 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
oxidecomputer/skepsis#102 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
voidzero-dev/void#677 ·
Los mantenedores suelen responder en 1 día