Repository navigation
feat(service,host): a running agent's transcript is held open on Neon Realtime rather than polled - #3282
Merged
Conversation
luke-agent
Bot
changed the base branch from
main
to
luke/neon-realtime-scope-inbox
October 17, 2026 01:22
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 17, 2026
luke-agent
Bot
force-pushed
the
luke/neon-realtime-scope-inbox
branch
from
October 18, 2026 19:21
0a6e6cd to
35d1920
Compare
luke-agent
Bot
force-pushed
the
luke/live-agent-transcript
branch
from
October 18, 2026 19:59
4cae45f to
c4310b1
Compare
luke-agent
Bot
force-pushed
the
luke/neon-realtime-scope-inbox
branch
from
October 18, 2026 21:12
35d1920 to
ff729c0
Compare
luke-agent
Bot
force-pushed
the
luke/live-agent-transcript
branch
from
October 18, 2026 21:32
c4310b1 to
4da7abd
Compare
luke-agent
Bot
force-pushed
the
luke/neon-realtime-scope-inbox
branch
from
October 19, 2026 18:52
ff729c0 to
7c1c859
Compare
luke-agent
Bot
force-pushed
the
luke/live-agent-transcript
branch
from
October 19, 2026 18:52
4da7abd to
f103d68
Compare
luke-agent
Bot
force-pushed
the
luke/neon-realtime-scope-inbox
branch
3 times, most recently
from
October 20, 2026 01:43
39ca561 to
40e1669
Compare
luke-agent
Bot
force-pushed
the
luke/live-agent-transcript
branch
from
October 20, 2026 02:24
f103d68 to
ed855dd
Compare
luke-agent
Bot
force-pushed
the
luke/neon-realtime-scope-inbox
branch
2 times, most recently
from
October 20, 2026 15:50
ff97170 to
9710e65
Compare
luke-agent
Bot
force-pushed
the
luke/live-agent-transcript
branch
from
October 20, 2026 19:29
446f346 to
f749ce2
Compare
luke-agent
Bot
changed the base branch from
luke/neon-realtime-scope-inbox
to
main
October 20, 2026 19:29
luke-agent
Bot
force-pushed
the
luke/live-agent-transcript
branch
from
October 20, 2026 19:58
f749ce2 to
0cdccf2
Compare
… Realtime rather than polled The service seals what a transcript's pages are read from at GET /api/live/agent-transcript?id=[&call=] (live.agentTranscript on the oRPC live contract): its messages, its turns by status, its conversation's journal revision and title, the agent's title, and its workers' titles and delegations, each joined through the reader's membership of the agent's workspace and keyed. An agent's or a worker's transcript read with wait=none answers at once, with whether the held read would have held on it. The host answers the window's codingAgents.messages from those statements: it reads the page at once, and while the service says it would hold, reads it again only when they move, within the same 20 s hold. A seal the service did not answer, or a subscription that stopped, is sealed again a second later; a sign-out lets every subscription go. The renderer is unchanged. The statements run through mutableFunctionsOf and the seal check in live-statements.test.ts. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
luke-agent
Bot
force-pushed
the
luke/live-agent-transcript
branch
from
October 20, 2026 20:30
0cdccf2 to
62391f1
Compare
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.
Stacked on #3232 (
luke/neon-realtime-scope-inbox). This is the first PR of the Neon Realtime transcript work: it removes the service's 500 ms poll for a shown running agent's transcript. The renderer doesn't change.What it does
The window still sends
codingAgents.messageswith its cursor. The host now answers it the wayscope-inbox-follow.tsanswers an inbox:GET /api/live/agent-transcript?id=[&call=]) and subscribes over Realtime. Subscriptions are kept in anRcMapkeyed by agent and call, and let go 30 s after the last read.wait=none. That returns at once withholds, which says whether today's held read would have kept waiting on that page.holdsis false, the host answers the window. If it's true, the host reads again only when the statements move, up to the same 20 s hold. At the end of the hold it reads one last time, as the service does today.The page itself, including the usage priced from the AI Gateway catalog, is still assembled by the service.
Live statements (
coder-host/transcript-live.ts) are deterministic, aliased withliveSelection, and read only the owner's rows:messages: count and max seq.turns: grouped by status, with count, stopped count, and when each last changed.conversation: journal revision and title.agent: the agent's title.workers: each child conversation with its title and delegation call.Together these move whenever the held read would wake: a message added or amended, a status change (including a line awaiting its turn), a title landing, or a delegation being recorded.
Realtime alone, with no held-read fallback:
Behaviour changes worth knowing
STARTING_GRACE(5 min), and the title window (TITLE_TIMEOUT) closing. Today the service sees these within 500 ms. Here they're seen at the end of the hold, up to 20 s later. This only affects the last empty page, never a message.wait=none.Tests
coder-host.test.ts(PGlite): a real coding turn is relayed event by event. After every event where the page past the cursor gains messages or changes status, the live rows have moved.holdsmatches the turn's state. Titles and delegations move them too, for the agent's own transcript and a worker's. Another account's statements read nothing.live-app.test.ts: the transcript is sealed for the owner, a worker's under the child conversation its call opens. A stranger gets not found. With no Realtime, the endpoint answers unavailable.coding-agents-app.test.ts:wait=noneanswers at once withholds, for the agent and for a worker whose delegation isn't recorded yet.compose-coding-agents.test.ts(scripted Realtime): covers the at-once answer, a read held until the statements move, the empty page at the end of the hold, a stopped subscription read at once and resealed, not found, an unsealed transcript sealed again then read live, and sign-out.live-wireschemas were recorded underLUKE_UPDATE_FIXTURES=1, and rewrites were regenerated.pnpm check:affectedpasses apart fromapps/desktop/src/main/app-menu.test.ts, which needs an Electron binary the sandbox doesn't have.Next, if it stays clean
Assemble pages on the desktop from live rows, as pure functions in
packages/features, and keep usage fetched.Made with Luke
Summary by cubic
The host now answers a window's read of a running agent's transcript through Neon Realtime subscriptions instead of the service polling every 500 ms, while the window's read and the assembled page stay unchanged.
Behavior changes
wait=none.Fallbacks
Written for commit 4cae45f. Summary will update on new commits.