Repository navigation
feat(realtime): a call's spoken turn shows its files as cards and can be branched - #810
Merged
Merged
Conversation
…iles are file cards, and it can be branched
A call's turns were saved with neither end-of-turn step a typed turn runs: a call that ran run_command to create
hello.md showed "Ran a command" and no file card, and no spoken turn could be branched.
- When a call's turn is kept for the first time (as it completes, or at the hang-up), a turn that ran run_command
ends as a typed turn does, with the same functions: its produced files are collected and attached as
container_file_citation annotations (file cards with a download), the changed-files set is written, and the
task's workspace is checkpointed with the turn's id, so the commit is its branch point. After a command still
running, and only once the call has restored the task's workspace.
- A turn that ran no command changed no file: no tarball is made for it. Its branch point is the one of the
response before it (a typed turn's or the call's previous turn's), kept under its own id. A turn with no
earlier point (a new task's first exchanges) is not offered for a branch rather than given a guessed one.
- The end of a call keeps the workspace again only when a command ran after the last turn that kept it.
- Keeping a call's turns is one at a time per call, so the follower and the hang-up never both take a turn's end.
- POST /v1/harnesses/{id}/realtime/sessions takes branch_from: the call is placed in a new task branched from that
reply, made as a typed branch is (_branch_source, _branch_prepare), and starts from what was said up to it.
- Console: a call's reply has Branch where its turn says it can be branched (not while a call is on), and a voice
branch's first call makes the branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on as a second site that holds the gates without a heartbeat Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
richard-epsilla
approved these changes
Dec 2, 2026
richard-epsilla
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed: a call's turns get the typed path's end-of-turn file collection and checkpoint, so file cards and Branch work on calls; branch_from places a call on a branch with its history. Live proof 11/11; screenshots reviewed at four widths.
This branch was successfully deployed
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.
What
A voice call's spoken turns now end the way typed turns do:
branchable). The console shows Branch on a call's replies, and a new call placed on the branch continues from that point.Why
Typed turns run two end-of-turn steps: the produced files are collected and attached as
container_file_citationannotations, and the workspace is checkpointed with the turn's id, which keeps the commit as the turn's branch point. A call's turns were saved without either step. So a call that ranrun_commandto createhello.mdshowed "Ran a command" but no file card, and no spoken turn could be branched.How
Server (gateway/app.py)
_realtime_turn_endruns the typed path's own functions:_collect_produced, the changed-files write (now_changed_put, shared with the typed path),_checkpoint(..., response_id=...)and_too_large_saved. The files become the same annotations (now built by_file_citations, shared with_RespTranslator.complete), and the record carries_branch_point.run_command, the one tool of a call that changes the task's files. It runs after any command that is still running (the call's command lock), and only once the call has restored the task's workspace, so a sandbox that never restored it is never saved over the task's files.POST /v1/harnesses/{id}/realtime/sessionstakesbranch_from: the call is placed in a new task branched from that reply. The task is made the same way a typed branch is (_branch_source,_branch_prepare), and the call starts from what was said up to that reply. A reply that can't be branched returns 409branch_unavailablebefore anything is made. If the call then fails to start, it leaves no branch behind.Console
branch_from). After that, the branch is a task like any other.Docs:
docs/realtime.md(call turns' files, branching a call's turn,branch_from) anddocs/voice-calls.md.Tests
gateway/tests/test_realtime_call_turn_end.py(13 tests, all failing on main):branch_fromon the call route;ui/.../Playground.callBranch.test.tsx(2 tests): a call turn carrying bothfilesandbranchabledraws its card and Branch (none when the turn says it can't be branched, and none while a call is on). A voice branch's first call names the reply.gateway/tests/test_turn_slot.py: the guard on where the turn gates are taken now counts two sites that hold them without a heartbeat (a typed branch's preparation and a call's withbranch_from).ui/.../voiceCall.test.ts(1 test):branch_fromis sent, never together withsession_id, and a refusal is shown in words.🤖 Generated with Claude Code