Skip to content

feat(voice): add session_host to AgentSession.start() - #6725

Merged
theomonnom merged 1 commit into
mainfrom
theo/agent-session-is-primary
Aug 6, 2026
Merged

feat(voice): add session_host to AgentSession.start()#6725
theomonnom merged 1 commit into
mainfrom
theo/agent-session-is-primary

Conversation

@theomonnom

@theomonnom theomonnom commented Aug 6, 2026

Copy link
Copy Markdown
Member

No description provided.

@theomonnom
theomonnom requested a review from a team as a code owner August 6, 2026 06:03
devin-ai-integration[bot]

This comment was marked as resolved.

@theomonnom
theomonnom force-pushed the theo/agent-session-is-primary branch 4 times, most recently from 035b7ce to b82a777 Compare August 6, 2026 06:23
@theomonnom theomonnom changed the title feat(voice): let a session opt out of hosting the control channel feat(voice): add session_host to AgentSession.start() Aug 6, 2026
@theomonnom
theomonnom force-pushed the theo/agent-session-is-primary branch 2 times, most recently from 4dba1f3 to f331b19 Compare August 6, 2026 06:37
devin-ai-integration[bot]

This comment was marked as resolved.

Hosting claims the room's `lk.agent.session` topic, of which an `rtc.Room` holds
one handler, so a Room that is already a `RemoteSession` client cannot also host.
Sharing the topic is not an option either: a host filters no sender and
broadcasts with no destination, so it would consume the replies meant for the
client and spray events at peers that parse them as requests.

The only lever was `is_primary`, reachable solely through a JobContext already
holding a different primary session — so a session outside any job context is
always the host, and the only escape was shadowing the private `_session_host`
attribute.

The flag narrows the host gate and nothing else: primary designation, the
non-primary recording fallback and init_recording keep running exactly as
before, so a non-hosting session under a job is still tracked, still closed at
shutdown, and still declines to record over another.
@theomonnom
theomonnom force-pushed the theo/agent-session-is-primary branch from f331b19 to 7842cd9 Compare August 6, 2026 15:12

@chenghao-mou chenghao-mou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. same shape as #6137

@theomonnom
theomonnom merged commit 3461f1f into main Aug 6, 2026
20 of 24 checks passed
@theomonnom
theomonnom deleted the theo/agent-session-is-primary branch August 6, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants