Repository navigation
Conversation
A server now keeps a token in <home>/token and refuses a WebSocket upgrade that does not offer it, or that comes from a foreign Host or Origin. The token is published in service.json, and the CLI, the app server and the desktop renderer send it when they connect. - The CLI sends the token only to the server its home registered, and prints a plain error for any other --server URL. - The app server takes its own token per start and stores one on each remote server row. - server.info reports the machine id. - Machine test fixtures install from the checkout under test. - Fix a reads test that assumed the first chunk arrives as a delta. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 20, 2026
This branch has not been 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 #171. It lands in
canaryonce #171 merges.What changes
A CodeWork server no longer accepts any local caller. It keeps a token per home and refuses a WebSocket upgrade that does not carry it.
<home>/token(mode 0600) and copied intoservice.jsonat each start. Delete the file and restart to replace it.Host(on a loopback bind) orOrigingets 403.Sec-WebSocket-Protocol: codework, <token>. The server selectscodework, so the token is never echoed.--serverURL is refused with a plain error and hint.--homenow works with--server.server.inforeports the machine id.Also in here
Breaking
Verified
vp check,vp run typecheck, knip exportspackages/codeworktestsapps/servertests, three runsAlso driven by hand: the upgrade matrix from the Mac and between three OrbStack machines, the Electron app through setup, connect and a real prompt, and each CLI
--servercase.Known gaps
ws://to a non-loopback host.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.