René's URL Explorer Experiment


Title: muse-proxy (PR #479): streaming responses silently drop the terminal text tail that non-streaming returns · Issue #484 · developing-today/code · GitHub

Open Graph Title: muse-proxy (PR #479): streaming responses silently drop the terminal text tail that non-streaming returns · Issue #484 · developing-today/code

X Title: muse-proxy (PR #479): streaming responses silently drop the terminal text tail that non-streaming returns · Issue #484 · developing-today/code

Description: Finding In PR #479 (bin/muse-proxy.mjs, commit 9e7dcbd), a streaming chat-completions response can silently lose the tail of the assistant's reply. The proxy tracks two sources of response text: run.output.delta events are appended to fu...

Open Graph Description: Finding In PR #479 (bin/muse-proxy.mjs, commit 9e7dcbd), a streaming chat-completions response can silently lose the tail of the assistant's reply. The proxy tracks two sources of response text: ru...

X Description: Finding In PR #479 (bin/muse-proxy.mjs, commit 9e7dcbd), a streaming chat-completions response can silently lose the tail of the assistant's reply. The proxy tracks two sources of response text...

Opengraph URL: https://github.com/developing-today/code/issues/484

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"muse-proxy (PR #479): streaming responses silently drop the terminal text tail that non-streaming returns","articleBody":"## Finding\n\nIn PR #479 (`bin/muse-proxy.mjs`, commit 9e7dcbde15e35bd71b7e50dd5762285477255c65), a streaming chat-completions response can silently lose the tail of the assistant's reply.\n\nThe proxy tracks two sources of response text:\n\n- `run.output.delta` events are appended to `fullContent` and, in stream mode, written to the client immediately as SSE chunks (bin/muse-proxy.mjs:317-336 in the PR head).\n- The `run.terminal.*` event carries the authoritative final text in `payload.text`, stored as `terminalText` (bin/muse-proxy.mjs:341-342).\n\nOn child close, the non-streaming path reconciles them:\n\n```js\n// Prefer the terminal event's authoritative text if deltas missed any\nif (terminalText !== null && terminalText.length >= fullContent.length) {\n  fullContent = terminalText;\n}\n```\n(bin/muse-proxy.mjs:376-377)\n\nBut the streaming branch (bin/muse-proxy.mjs:~390-410) only writes a final chunk with `delta: {}`, `finish_reason: 'stop'`, and usage, then `data: [DONE]`. It never emits the part of `terminalText` that was not already streamed. So whenever the terminal text is longer than the sum of the deltas — the exact case the comment says the reconciliation exists for (\"if deltas missed any\") — streaming clients receive a truncated reply that nevertheless claims `finish_reason: \"stop\"`, while non-streaming clients receive the full text for the identical run.\n\n## Evidence (reproduced against the PR head)\n\nRan the PR's `bin/muse-proxy.mjs` (fetched via the contents API at the PR head sha, byte-count matches the `gh pr diff` hunk: 459 lines) with a stub `muse` binary emitting:\n\n```json\n{\"payload_type\":\"run.output.delta\",\"payload\":{\"text\":\"Hel\"}}\n{\"payload_type\":\"run.usage\",\"payload\":{\"models\":[{\"input_tokens\":100,\"output_tokens\":3}]}}\n{\"payload_type\":\"run.terminal.completed\",\"payload\":{\"terminal\":\"completed\",\"text\":\"Hello world\"}}\n```\n\n- Non-streaming `POST /v1/chat/completions` returned content `\"Hello world\"` (correct).\n- Streaming (`\"stream\": true`) returned exactly one content chunk `\"Hel\"`, then a finish chunk with `finish_reason: \"stop\"` and `data: [DONE]` — `\"lo world\"` was never sent.\n\nDeduped: issue searches for \"muse-proxy streaming terminal\" and \"run.terminal\" return no existing issue. The sibling `bin/codex-proxy.mjs` has no terminal-text concept (its CLI stream differs), so this is muse-proxy only; `git grep muse-proxy` on the other three repos' mains (opencode/openchamber/nix) is empty.\n\n## Why it matters\n\nOpenCode (the stated consumer, wired as provider `muse`) typically consumes these bridges in streaming mode. A response that ends mid-sentence while reporting a clean `stop` is worse than an error: downstream code and users treat the truncated text as the complete answer, and the discrepancy is invisible unless someone compares against a non-streaming call.\n\n## Acceptance criteria\n\n- [ ] In stream mode, before the finish chunk, emit any suffix of the terminal text that was not already streamed (when `terminalText` starts with the streamed `fullContent`), or otherwise guarantee streamed content equals the non-streamed content for the same run.\n- [ ] If the terminal text diverges from the streamed deltas in a way that cannot be reconciled as a suffix, the behaviour is explicit (documented) rather than silently truncated.\n- [ ] A regression test with a stub `muse` emitting deltas that are a strict prefix of the terminal text passes in both stream and non-stream modes, asserting identical final content.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-21T14:51:22Z","url":"https://github.com/developing-today/code/issues/484"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f9314306-a21b-d723-2238-698934e9228b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA95A:3CF71B:5C6756:7B90D8:6B0624F9
html-safe-nonce9044800f352742ca2ea116284b6d2f62755bccdbc7fd99e86a2a2694eef5ef63
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTVBOjNDRjcxQjo1QzY3NTY6N0I5MEQ4OjZCMDYyNEY5IiwidmlzaXRvcl9pZCI6IjQyNjk2Mjk1NzYzMTk0NzY5ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc55ef72e3cd8c57d045329ccf6303574a1094edf4dfeb843eb1a5dac81ed53f3
hovercard-subject-tagissue:5962868483
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/484/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1974c863d68cd0fc55bc8bf98782e8aa6e4f2863c2db354ae88ce96a9d1ff8f8/developing-today/code/issues/484
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1974c863d68cd0fc55bc8bf98782e8aa6e4f2863c2db354ae88ce96a9d1ff8f8/developing-today/code/issues/484
og:image:altFinding In PR #479 (bin/muse-proxy.mjs, commit 9e7dcbd), a streaming chat-completions response can silently lose the tail of the assistant's reply. The proxy tracks two sources of response text: ru...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None9e10bb0ecc0bd0f8692aa89586ee9b54e498d7ab9f244a44cdb5b93653a125ce
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release32e57d5cc2ce6ce92ec6dceb65858344750c27c2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/484#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F484
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F484
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/484
Reloadhttps://github.com/developing-today/code/issues/484
Reloadhttps://github.com/developing-today/code/issues/484
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests146 (146)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/484
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/484
muse-proxy (PR #479): streaming responses silently drop the terminal text tail that non-streaming returnshttps://github.com/developing-today/code/issues/484#top
https://github.com/dezren39
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
meta/enrichedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22meta%2Fenriched%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/humanhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fhuman%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 21, 2026https://github.com/developing-today/code/issues/484#issue-5962868483
#479https://github.com/developing-today/code/pull/479
9e7dcbdhttps://github.com/developing-today/code/commit/9e7dcbde15e35bd71b7e50dd5762285477255c65
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 21, 2026https://github.com/developing-today/code/issues/484#event-33857532716
dezren39https://github.com/dezren39
on Oct 21, 2026https://github.com/developing-today/code/issues/484#event-33883943654
fix(bin): muse-proxy streaming emits the terminal text tail (#484)https://github.com/developing-today/code/commit/dadf21312cb306b5ba7a450011e6e338695482af
#484https://github.com/developing-today/code/issues/484
dadf213https://github.com/developing-today/code/commit/dadf21312cb306b5ba7a450011e6e338695482af
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 21, 2026https://github.com/developing-today/code/issues/484#issuecomment-6325304715
#479https://github.com/developing-today/code/pull/479
#479https://github.com/developing-today/code/pull/479
#485https://github.com/developing-today/code/issues/485
dezren39https://github.com/dezren39
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
source/humanhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fhuman%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
meta/enrichedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22meta%2Fenriched%22
on Oct 26, 2026https://github.com/developing-today/code/issues/484#event-34291979337
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 26, 2026https://github.com/developing-today/code/issues/484#issuecomment-6424154659
#484https://github.com/developing-today/code/issues/484
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 26, 2026https://github.com/developing-today/code/issues/484#event-34291991298
developing-todayhttps://github.com/apps/developing-today
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
on Oct 26, 2026https://github.com/developing-today/code/issues/484#event-34291996148
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/484
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/484
dezren39https://github.com/dezren39
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
meta/enrichedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22meta%2Fenriched%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/humanhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fhuman%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.