Repository navigation
Loom can be tried in GitHub Codespaces: a dev container installs the latest release and connects Claude Code - #578
Merged
Merged
Conversation
…latest release and connects Claude Code Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ocal port 7777, and its docs say who can reach it Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…start policy on resume, and its docs claim only what a rebuild keeps Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ard once Loom answers, and drops a key the dev container spec does not define Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…answers, and to run claude outside the checkout Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… loopback pages the try-out trusts Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…address is its own page Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…uild moves to the latest release Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…the docs say how to rerun a failed setup Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… log line to open, and the Chinese README offers it too Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
feat/codespaces-try-out
branch
from
November 12, 2026 21:18
d0e0aff to
1c20b14
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Loom can be tried with nothing installed: the README's "Open in GitHub Codespaces" button starts a codespace that installs the latest release, offers its dashboard and connects Claude Code to it.
Why
Every way to try Loom needs Docker on the user's machine. A codespace gives a newcomer without Docker, or one evaluating before installing anything, the same stack in a browser tab.
Design.
.devcontainer/devcontainer.jsonruns an Ubuntu dev container with the docker-in-docker and Node features, asks for 4 CPUs and 16 GB (ClickHouse, the server and the document extractor), and forwards port 7777, which Codespaces keeps private to the signed-in user unless it is made public (the dev container spec has no visibility key), withonAutoForward: notify, since the port listens before Loom answers and a tab opened at once would show an error, andrequireLocalPort, so desktop VS Code forwards to the laptop's port 7777, where the plugin looks, or reports the clash.LOOM_INSTALL_DIR=/workspaces/.loom(incontainerEnv) keeps the install outside the home directory, which a rebuild replaces: a rebuilt container finds the same.envand Compose project, rather than starting a second stack with a new project that cannot get the port..devcontainer/start-loom.shruns on create; it stops whenLOOM_INSTALL_DIRis unset, waits up to 60 s for the docker-in-docker daemon (the installer stops at once when it cannot reach Docker), claims the install directory withsudowhen the container's user cannot write it, and then:install.sh, the file a user downloads, so the codespace runs a released installer with its own release's bundle;LOOM_SKIP_START=1, which writes the stack files and.env;LOOM_PUBLIC_BASE_URL=https://$CODESPACE_NAME-7777.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAINto.env. A server without sign-in answers only a loopback Host or its public URL's (web_refusalinserver/main.py), and its dashboard's writes only from its own origin, which is then that URL. No other origin is trusted: an earlier push listed the laptop's loopback origins inLOOM_CORS_ORIGINSfor desktop VS Code's forward, which would also trust any page the laptop serves on port 7777 in a browser-only codespace;.env, starts the stack and waits for health;claude plugin marketplace listdoes not show it. Its closing message prints the dashboard's forwarded address (in desktop VS Code the Ports tab's local address is the laptop's localhost, which shows no data) and says to runcd ~ && claude, outside the checkout, whose agent instructions are for working on Loom itself. The script can be run again after a failed create; the docs say so.A resumed codespace needs no start command: every service restarts unless stopped, so dockerd brings the stack back. Rerunning the installer on a rebuild finds
.envinLOOM_INSTALL_DIRand keeps it with its Compose project, and moves the install to the latest release, as the docs say; the docs also say a rebuild may start with empty memories, since they live in Docker volumes; whether the docker-in-docker volume, and so the data, survives a rebuild is up to Codespaces and was not tested.Security. The try-out runs single-user, with no sign-in, on loopback inside the codespace, as a local install does. In the browser, Codespaces forwards port 7777 privately: the forwarded address answers only the signed-in GitHub account. The docs say to keep it private, since public or private-to-organization visibility opens a server with no sign-in to everyone it is shared with, and the server cannot see that setting. Opened in desktop VS Code, the codespace also forwards the port to the laptop's
localhost:7777, where it is as open as a local install to every program on the laptop, and only when that local port is free (requireLocalPort); the docs say both. A Host other than the codespace's address and loopback is refused (421), and the only trusted Origin is the forwarded address. The dashboard opened from the laptop'slocalhost:7777therefore loads, but every request it makes is a POST with that Origin, reads included, so each is refused (403) and the page shows no data; the docs say to use the browser address. Admitting it safely needs the server to treat an Origin that matches its own loopback Host as same-origin whileLOOM_PUBLIC_BASE_URLis set, which is a change to the server's origin check and is left for its own PR. The dashboard's connection lines name the forwarded address, which a CLI in the codespace cannot pass; the docs say agents inside the codespace usehttp://localhost:7777, which the installed plugin already uses.Alternatives. Running the repository's own
install.shwould pair main's installer with the latest release's bundle, two versions that were never released together. Building the image from source in the codespace would take far longer and run unreleased code. One-click deploys to hosted platforms serve a public URL, where single-user mode is unsafe and the server refuses to start without sign-in; they are left for a first boot that sets up sign-in in one step.Scope and risk
New:
.devcontainer/devcontainer.json,.devcontainer/start-loom.sh. Docs: a quickstart section, a button inREADME.mdandREADME.zh-CN.md, and a repository-guide row. It becomes the repository's only dev container; it is a try-out, not a development environment, and both the file and the repository guide say so (a checkout's setup isdocs/development). The install directory/workspaces/.loomsits next to the checkout, not in it, so its.envwith the JWT secret is never in the working tree. Nothing in the server, the images or the installer changes.Compatibility, rollout and rollback
Tests
The "about 3 GB of images" in the docs is the measured cold pull of the 1.2.0 stack: the Loom image 2.0 GB, ClickHouse 921 MB and the extractor 369 MB on arm64.
All runs use the devcontainers CLI 0.80.2 on an arm64 host, with
CODESPACE_NAMEandGITHUB_CODESPACES_PORT_FORWARDING_DOMAINset as a codespace sets them (devcontainer up --workspace-folder . --remote-env CODESPACE_NAME=day0-test --remote-env GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN=app.github.dev), installing release 1.2.0. Each container, its volumes and its image were removed after the run.~/.loom): created cold in 260 s. Inside:.envheldLOOM_PUBLIC_BASE_URL=https://day0-test-7777.app.github.dev; the dashboard as a navigation with the codespace's Host: 200;memory.setwith that Host and itshttps://Origin: 200; with Originhttp://localhost:7777: 200; a foreign Host: 421; a foreign Origin: 403;claude mcp list:plugin:loom:loom ... Connected./workspaces/.loomstanding in for the codespace's persistent/workspaces(--mount type=volume,source=...,target=/workspaces/.loom, then the same with--remove-existing-container): the first try failed withPermission deniedon the root-owned directory, which thesudostep fixes. Then: created in 98 s; a memory written; rebuilt in 30 s with the sameCOMPOSE_PROJECT_NAME, the three containers healthy, the memory read back (the volumes lived on in the reused docker-in-docker volume) andclaude mcp listConnected..envholdsLOOM_CORS_ORIGINS=http://localhost:7777,http://127.0.0.1:7777;memory.setwith Originhttp://127.0.0.1:7777: 200,http://localhost:7777: 200,https://evil.example: 403;docker stopanddocker startof the dev container: health answered 10 s after the start.notify, no visibility key,:?guard; the CORS and Host handling are the same as the run above): created in 119 s, health 200,claude mcp listConnected. The commits after it change only text and the closing message, and remove the CORS lines (run below).LOOM_CORS_ORIGINS): created in 181 s;.envholds onlyLOOM_PUBLIC_BASE_URL;memory.setwith the codespace's Host and Origin: 200; with Originhttp://localhost:7777: 403; with Originhttp://127.0.0.1:7777: 403; with no Origin, as an agent or curl sends it: 200;claude mcp listConnected.Dashboard: http://127.0.0.1:7777/and thenLoom is running in the codespace. Dashboard: https://day0-test-7777.app.github.dev;sh .devcontainer/start-loom.shrun a second time in the same container exits 0,.envstill holds oneLOOM_PUBLIC_BASE_URLline, andclaude mcp liststays Connected.codespacescope), so the github.dev proxy itself (which Host it forwards), its sign-in redirect, whether/workspacesand the docker-in-docker volume survive a rebuild there, the owner of/workspaces, and the 4-core machine's timing are untested here.make format-check lint,test_doc_links.py,test_public_copy.py,test_agent_instructions.py,test_docs_reference.pypass.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. Checked: the dev container end to end with the devcontainers CLI and the Host/Origin checks above.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-checkandmake lintpass, and the unit tests listed above; no server code changed.main; no merged migration is edited.frontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code