Skip to content

fix useChat on hmr#935

Closed
deathbyknowledge wants to merge 1 commit into
mainfrom
fix-hmr
Closed

fix useChat on hmr#935
deathbyknowledge wants to merge 1 commit into
mainfrom
fix-hmr

Conversation

@deathbyknowledge

@deathbyknowledge deathbyknowledge commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #50, addressed in cloudflare/partykit#335

@changeset-bot

changeset-bot Bot commented Feb 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7ec3e44

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@deathbyknowledge

Copy link
Copy Markdown
Contributor Author

/bonk review please

@pkg-pr-new

pkg-pr-new Bot commented Feb 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/agents@935

commit: 5fcc49f

@ask-bonk

ask-bonk Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

remote: Permission to cloudflare/agents.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/cloudflare/agents/': The requested URL returned error: 403

github run

@ask-bonk

ask-bonk Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Bonk workflow failed. Check the logs for details.

View workflow run

@deathbyknowledge
deathbyknowledge marked this pull request as ready for review February 18, 2026 14:56
@deathbyknowledge

Copy link
Copy Markdown
Contributor Author

/bonk review please

@ask-bonk

ask-bonk Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

remote: Permission to cloudflare/agents.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/cloudflare/agents/': The requested URL returned error: 403

github run

@ask-bonk

ask-bonk Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Bonk workflow failed. Check the logs for details.

View workflow run

@threepointone

Copy link
Copy Markdown
Contributor

is there a better fix we can just do on the partysocket side?

@deathbyknowledge

Copy link
Copy Markdown
Contributor Author

is there a better fix we can just do on the partysocket side?

Yes, my bad. cloudflare/partykit#335 looks good?

partysocket 1.1.14 fixes useStableSocket replacing the socket on HMR
effect re-runs. This was the root cause of useChat breaking on HMR —
the socket identity was lost, orphaning in-flight streams and resetting
chat state. No application-level changes needed in ai-chat.
@threepointone

Copy link
Copy Markdown
Contributor

I'm getting the deps update done in #954

@threepointone
threepointone deleted the fix-hmr branch February 20, 2026 10:37
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.

useChat breaks on HMR

2 participants