fix(server): thread snapshot returns empty HTTP 400 when an AskUserQuestion entry has no question text
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 88/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
Inizia in packages/shared/src/toolActivity.ts, su projectQuestionToolInput, poi trova i test esistenti e verifica come viene rappresentato il testo della domanda mancante. Aggiungi la copertura di regressione toStrictEqual richiesta e verifica che uno snapshot di thread contenente un’attività AskUserQuestion incompleta non produca più l’HTTP 400 segnalato né una risposta vuota.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version: v0.0.42 (stock npm install); the same code is on current main and the v0.0.43 nightly/preview tags as of 2026-09-26.
Repro
In a Claude thread, the model calls AskUserQuestion with an entry that has header and options but no question text (Claude rejects the call and the agent retries). The same shape also appears transiently when a streamed tool.updated for AskUserQuestion holds input.questions: [{}] because header streams before question.
From then on GET /api/orchestration/threads/:id returns HTTP 400 with an empty body; the web and mobile clients never load the thread ("waiting for input" / loading forever), while every other thread is fine. The WebSocket thread snapshot path fails the same way.
Server trace:
HttpApiSchemaError: Body … SchemaError: Expected JSON value at ["thread"]["activities"][N]["payload"]
Root cause
projectQuestionToolInput (packages/shared/src/toolActivity.ts) maps each question to { question: asTrimmedString(...) }, which yields { question: undefined } when there is no text. OrchestrationThreadActivity.payload is Schema.Unknown, and the HttpApi JSON codec rejects undefined, so one bad activity fails the whole snapshot. Because the failed call's tool.completed row is kept, the thread stays unloadable permanently.
Proposed fix
Leave the key out when there is no text:
// packages/shared/src/toolActivity.ts, projectQuestionToolInput
text === undefined ? {} : { question: text }
with a toStrictEqual regression test. Clients already read record(question)?.question, so a missing key is handled. It may also be worth making projectActivityPayload JSON-safe in general (drop undefined values) so a single malformed activity can never make a thread unloadable.
Possibly related symptom: #10418.
Found and patched with Claude Opus 5.5 via Claude Code; a one-commit local build with this change fixes it here.
- Lingua principale
- TypeScript
- Stelle
- 24.8k
- Fork
- 6.4k
- Merge medio
- 7h 9m
- PR unite (30g)
- 244
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pingdotgg/t3code
-
[Bug]: Diff panel hides the current branch name and the arrow overlaps the base ref when the panel is narrowForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaaccepted bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pingdotgg/t3code#19048 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Windows repository cloning fails while creating an existing drive rootForse già presa @pujitha24 l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: iOS still shows "Failed to connect. Retrying" on every resume (follow-up to #5695)Forse già presa @otavio l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Server git tests sign fixture commits with the developer's key when run from the repo rootForse già presa @Mnigos l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pingdotgg/t3code
Issue simili
-
documentation good first issue hacktoberfest help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
libredb/libredb-studio#1756 ·
I maintainer di solito rispondono entro 1 giorno
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
lingdojo/kana-dojo#32365 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
friction
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
kentcdodds/kody#3706 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
copperheadhq/copperhead#378 ·
I maintainer di solito rispondono entro 1 giorno