Hand the voice each planning question the moment it is ready
Merged
CH
17d ago+471+471+012345678901234567890123456789-51-51-01234567890123456789
Stacked on #1768.
Summary
- Why: the voice heard the planning model only when its turn ended, apart from the fixed "reading the repository" note. A question that depended on the developer's last answer waited on the whole backend turn, repository reads included.
queue_question(server/hosted/queue-question.ts): a new planning tool taking{ question, recommendation }, each at most 500 characters. Running it does nothing. The store journals a call's input before the call runs, and that journaled input is what carries the question.- New turn event
question_queued:projectTurnEventsnow makes one pass over the journal's tool parts in order. It emits each queued question as soon as its input is whole, alongside the single slow step. The projection still only grows, soseqstays stable. - Voice:
live-session-service.tshands each queued question to GPT-Live assession.commentary.appendunder the current delegation, with no wait for the turn to settle. The delegation guide has commentary for "results GPT-Live should say aloud". It doesn't say when commentary is spoken, so the note itself asks Luke to put one question at a time, once the developer has answered what he already asked. - Fix: folded asks spoke the reply twice. When eve folds asks that waited together into one turn, each ask's follow projected the same turn, and the voice said every sentence once per ask. Now the first follow to reach a turn tells it, and the others tell only its end, so their exchanges still settle.
- Prompts: the planning model queues each question the moment it has one, before reading the repository or thinking further. Its final reply carries facts, status, and any question an answer made moot, and no longer re-lists the queue. The voice asks queued questions in order, one at a time, and drops any the backend calls moot.
A design rule moves: packages/hosted/AGENTS.md said turn events are "four run seams and nothing wider… No tool part". There are five now. queue_question is the one tool call whose words are told, because that's all the call is for. The AGENTS.md text and server/README.md are updated to say so.
PRIVACY.md is unchanged. The planning model's words already reach GPT-Live in its replies, and no new party sees anything.
Evidence
./scripts/check.shexit 0.- New tests, each failing without its change:
hosted-turn-event-stream.test.ts: queued questions are told mid-turn, in order, around the one slow step; a call still streaming or unreadable is not told.voice-live-brain.test.ts: a queued question reaches the service before the turn ends; two folded asks hear the reply once between them, and both hear the end. I reverted the fix and confirmed this one fails.live-session-service.test.ts: each queued question becomes its own commentary append under the delegation, in order, without waiting on the settle.
- Goldens:
turn-events-wire-turnEventSchema.jsongains thequestion_queuedvariant.queue-question-tool-input.jsonis new.- Both were recorded with
LUKE_UPDATE_FIXTURES=1, and no other golden moved. hosted-planning.test.ts's tool order now starts withqueue_question.
- CI could not verify the live behavior. Still to check on a preview planning call:
- a new question reaches Luke within seconds of an answer while a repository read is still running;
- Luke asks queued questions one at a time, not back to back when several arrive together;
- no reply is said twice.
./scripts/verify.sh: not run. There is no Mac or UI change.
🤖 Generated with Claude Code