Repository navigation
feat(voice): talk with Scient Agent from a conversation's first message - #916
Merged
Merged
Conversation
A voice call ran inside the conversation's Scient Agent session, so it needed a first message and an agent still running: none on a new conversation, none after a restart or 30 idle minutes. With Scient Agent 0.1.10 or newer, the call runs in an agent process of its own. Each spoken request is sent to the conversation as the user's message: on a draft the window sends the first one, which creates the conversation like a typed message; after that the server sends them. The server follows the conversation and reports the request's turn back with `live_report`, progress as commentary and the answer to speak. The call is kept per conversation outside the composer, so the switch from draft to conversation doesn't hang up; leaving it still does. An older agent keeps the call in the conversation's session, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Platforms: the same on macOS, Windows and Linux. The call agent is started like Scient Agent's sign-in process, through
resolveSpawnCommand; the audio is WebRTC in the window, as before. Tested live on macOS only.What
You can now talk with Scient Agent from a conversation's first message. A call used to run inside the conversation's Scient Agent session, so it needed a first message ("Send a first message, then talk") and an agent still running, which ruled out calls after a restart or 30 idle minutes.
With Scient Agent 0.1.10 or newer (scient-agent#55):
provider/scient/ScientAgentLiveVoiceHost.ts, a newliveVoiceHostseam on the Scient Agent instance), apart from any conversation's session.scient/liveVoice/LiveVoiceTurnReporter.ts). It finds the run that the request's message started, ignoring a turn that was already running, and sends that run's earlier assistant messages as progress and its last one as the answer to speak, vialive_report. A failed or stopped run says so instead.useScientLiveVoiceCall.ts), so the switch from draft to conversation doesn't hang up. Leaving the conversation still hangs up, after a 2-second grace.An agent older than 0.1.10 keeps the call in the conversation's session, as before, and the button still asks for a first message there.
T3 files change only inside the existing SCIENT-FORK voice blocks of
ChatComposer.tsxandws.ts.Tests
LiveVoiceTurnReporter.test.ts: progress then the answer; a turn already running when the request was queued is not spoken; a failed run says so.liveVoiceAvailability.test.ts: an agent at 0.1.10 can call before the first message, 0.1.9 asks for one, and a missing ChatGPT sign-in is asked for first.pnpm run typecheck, lint, fmt and knip pass, as do the seam check and provenance. The server liveVoice, OmpLiveVoice and RpcAuthorization suites pass, and so do the web liveVoice and voice unit suites.🤖 Generated with Claude Code